Skip to content

Commit

Permalink
Merge ab96e2d into 3da56d9
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Jul 13, 2020
2 parents 3da56d9 + ab96e2d commit d78e463
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
7 changes: 7 additions & 0 deletions 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.2.42

-------------------------------------------------------------------
Thu May 28 10:50:51 UTC 2020 - Martin Vidner <mvidner@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-registration.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-registration
Version: 4.2.41
Version: 4.2.42
Release: 0
Summary: YaST2 - Registration Module
License: GPL-2.0-only
Expand Down
5 changes: 4 additions & 1 deletion src/lib/registration/registration.rb
Expand Up @@ -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}" }

Expand Down
7 changes: 7 additions & 0 deletions test/registration_spec.rb
Expand Up @@ -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

Expand Down

0 comments on commit d78e463

Please sign in to comment.