diff --git a/package/yast2-registration.changes b/package/yast2-registration.changes index bfc88465e..ea4caef76 100644 --- a/package/yast2-registration.changes +++ b/package/yast2-registration.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jul 9 10:31:17 CEST 2020 - schubi@suse.de + +- Evaluating addon-list: Uses version without release for + connecting SCC (bsc#1162755). +- 4.3.2 + ------------------------------------------------------------------- Thu May 28 10:50:51 UTC 2020 - Martin Vidner diff --git a/package/yast2-registration.spec b/package/yast2-registration.spec index 7568273c3..4d7c0e239 100644 --- a/package/yast2-registration.spec +++ b/package/yast2-registration.spec @@ -17,7 +17,7 @@ Name: yast2-registration -Version: 4.3.1 +Version: 4.3.2 Release: 0 Summary: YaST2 - Registration Module License: GPL-2.0-only diff --git a/src/lib/registration/registration.rb b/src/lib/registration/registration.rb index f638ab4e2..b25277435 100644 --- a/src/lib/registration/registration.rb +++ b/src/lib/registration/registration.rb @@ -153,7 +153,10 @@ def get_addon_list log.info "Reading available addons for product: #{base_product["name"]}" - remote_product = SwMgmt.remote_product(base_product) + # base_product_to_register returns "version_version" for the version + # whereas installed_base_product returns "version_release". + # SCC needs in this case the version without the release. + remote_product = SwMgmt.remote_product(base_product, version_release: false) addons = SUSE::Connect::YaST.show_product(remote_product, connect_params).extensions || [] addons.each { |a| log.info "Found available addon: #{a.inspect}" } diff --git a/test/registration_spec.rb b/test/registration_spec.rb index 8bb78c165..256bfb8d5 100644 --- a/test/registration_spec.rb +++ b/test/registration_spec.rb @@ -153,6 +153,13 @@ "sle-module-legacy", "sle-module-web-scripting", "sle-module-public-cloud", "sle-module-adv-systems-management", "sle-hae") end + + it "uses version without release for connecting SCC" do + expect(Registration::SwMgmt).to receive(:remote_product).with( + base_product, version_release: false + ) + Registration::Registration.new.get_addon_list + end end end