Hello community, here is the log from the commit of package yast2-registration for openSUSE:Factory checked in at 2020-10-24 15:15:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-registration (Old) and /work/SRC/openSUSE:Factory/.yast2-registration.new.3463 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-registration" Sat Oct 24 15:15:01 2020 rev:61 rq:843151 version:4.3.12 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-registration/yast2-registration.changes 2020-10-18 16:20:14.476459311 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-registration.new.3463/yast2-registration.changes 2020-10-24 15:15:12.752083565 +0200 @@ -1,0 +2,15 @@ +Mon Oct 19 13:21:42 CEST 2020 - sch...@suse.de + +- AY Addon: Taking the latest version if no version has been + defined. Taking system architecture if no architecture has been + defined. (jsc#SLE-16225) +- 4.3.12 + +------------------------------------------------------------------- +Wed Oct 14 15:26:24 CEST 2020 - sch...@suse.de + +- Showing add-on selection screen only if they are available + (bsc#1177292). +- 4.3.11 + +------------------------------------------------------------------- Old: ---- yast2-registration-4.3.10.tar.bz2 New: ---- yast2-registration-4.3.12.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-registration.spec ++++++ --- /var/tmp/diff_new_pack.9vfwFQ/_old 2020-10-24 15:15:13.684084728 +0200 +++ /var/tmp/diff_new_pack.9vfwFQ/_new 2020-10-24 15:15:13.688084732 +0200 @@ -17,7 +17,7 @@ Name: yast2-registration -Version: 4.3.10 +Version: 4.3.12 Release: 0 Summary: YaST2 - Registration Module License: GPL-2.0-only ++++++ yast2-registration-4.3.10.tar.bz2 -> yast2-registration-4.3.12.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.10/package/yast2-registration.changes new/yast2-registration-4.3.12/package/yast2-registration.changes --- old/yast2-registration-4.3.10/package/yast2-registration.changes 2020-10-08 08:03:04.000000000 +0200 +++ new/yast2-registration-4.3.12/package/yast2-registration.changes 2020-10-21 10:35:30.000000000 +0200 @@ -1,4 +1,19 @@ ------------------------------------------------------------------- +Mon Oct 19 13:21:42 CEST 2020 - sch...@suse.de + +- AY Addon: Taking the latest version if no version has been + defined. Taking system architecture if no architecture has been + defined. (jsc#SLE-16225) +- 4.3.12 + +------------------------------------------------------------------- +Wed Oct 14 15:26:24 CEST 2020 - sch...@suse.de + +- Showing add-on selection screen only if they are available + (bsc#1177292). +- 4.3.11 + +------------------------------------------------------------------- Wed Oct 7 21:26:11 UTC 2020 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> - Do not export the registration e-mail if it is not defined diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.10/package/yast2-registration.spec new/yast2-registration-4.3.12/package/yast2-registration.spec --- old/yast2-registration-4.3.10/package/yast2-registration.spec 2020-10-08 08:03:04.000000000 +0200 +++ new/yast2-registration-4.3.12/package/yast2-registration.spec 2020-10-21 10:35:30.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-registration -Version: 4.3.10 +Version: 4.3.12 Release: 0 Summary: YaST2 - Registration Module License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.10/src/autoyast-rnc/registration.rnc new/yast2-registration-4.3.12/src/autoyast-rnc/registration.rnc --- old/yast2-registration-4.3.10/src/autoyast-rnc/registration.rnc 2020-10-08 08:03:04.000000000 +0200 +++ new/yast2-registration-4.3.12/src/autoyast-rnc/registration.rnc 2020-10-21 10:35:30.000000000 +0200 @@ -25,8 +25,8 @@ MAP, ( addon_name & - addon_version & - addon_arch & + addon_version? & + addon_arch? & addon_release_type? & addon_reg_code? ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.10/src/lib/registration/autoyast_addons.rb new/yast2-registration-4.3.12/src/lib/registration/autoyast_addons.rb --- old/yast2-registration-4.3.10/src/lib/registration/autoyast_addons.rb 2020-10-08 08:03:04.000000000 +0200 +++ new/yast2-registration-4.3.12/src/lib/registration/autoyast_addons.rb 2020-10-21 10:35:30.000000000 +0200 @@ -12,6 +12,7 @@ # require "yast" +require "y2packager/product_control_product" module Registration # This class handles the AutoYaST addons @@ -21,6 +22,8 @@ attr_accessor :requested_addons, :selected_addons Yast.import "Report" + Yast.import "Pkg" + Yast.import "Arch" # Constructor # @param requested_addons [Array<Hash<String,String>>] the addons configuration @@ -64,9 +67,20 @@ def select_addons(all_addons) # select the requested addons from the AY profile requested_addons.each do |addon| - server_addon = all_addons.find do |a| - a.identifier == addon["name"] && a.version == addon["version"] && - a.arch == addon["arch"] + # Set architecture if it is not defined in the requested addon + requested_arch = addon["arch"] || + Y2Packager::ProductControlProduct::REG_ARCH[Yast::Arch.architecture] || + Yast::Arch.architecture + + log.info("Select addon: #{addon.inspect}") + server_addons = all_addons.select do |a| + a.identifier == addon["name"] && + (!addon["version"] || a.version == addon["version"]) && # version defined ? + a.arch == requested_arch + end + # Select the highest version + server_addon = server_addons.max do |b, c| + Yast::Pkg.CompareVersions(b.version, c.version) end if server_addon diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.10/src/lib/registration/clients/inst_scc.rb new/yast2-registration-4.3.12/src/lib/registration/clients/inst_scc.rb --- old/yast2-registration-4.3.10/src/lib/registration/clients/inst_scc.rb 2020-10-08 08:03:04.000000000 +0200 +++ new/yast2-registration-4.3.12/src/lib/registration/clients/inst_scc.rb 2020-10-21 10:35:30.000000000 +0200 @@ -145,6 +145,11 @@ # FIXME: available_addons is called just to fill cache with popup return :cancel if get_available_addons == :cancel + if Registration::Addon.find_all(@registration).empty? + log.info("Skipping an empty add on selection screen.") + return :skip + end + # FIXME: workaround to reference between old way and new storage in Addon metaclass @selected_addons = Registration::Addon.selected ::Registration::Storage::InstallationOptions.instance.selected_addons = @selected_addons @@ -221,7 +226,9 @@ return :register unless ::Registration::Registration.is_registered? log.info "The system is already registered, displaying registered dialog" - ::Registration::UI::RegisteredSystemDialog.run + ::Registration::UI::RegisteredSystemDialog.run( + extensions_enabled: !Registration::Addon.find_all(@registration).empty? + ) end # display EULAs for the selected addons diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.10/src/lib/registration/ui/registered_system_dialog.rb new/yast2-registration-4.3.12/src/lib/registration/ui/registered_system_dialog.rb --- old/yast2-registration-4.3.10/src/lib/registration/ui/registered_system_dialog.rb 2020-10-08 08:03:04.000000000 +0200 +++ new/yast2-registration-4.3.12/src/lib/registration/ui/registered_system_dialog.rb 2020-10-21 10:35:30.000000000 +0200 @@ -18,10 +18,12 @@ Yast.import "UI" # displays and run the status dialog for an already registered system + # + # @param extensions_enabled [Boolean] select extension button enabled # @return [Symbol] user input - def self.run + def self.run(extensions_enabled: true) dialog = RegisteredSystemDialog.new - dialog.run + dialog.run(extensions_enabled: extensions_enabled) end # the constructor @@ -30,8 +32,10 @@ end # display and run the dialog + # + # @param extensions_enabled [Boolean] select extension button enabled # @return [Symbol] user input - def run + def run(extensions_enabled: true) Wizard.SetContents( # dialog title _("Registration"), @@ -46,6 +50,7 @@ true ) + Yast::UI.ChangeWidget(Id(:extensions), :Enabled, extensions_enabled) Wizard.SetNextButton(:next, Label.FinishButton) if Mode.normal continue_buttons = [:next, :back, :cancel, :abort, :register, :extensions] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.10/test/addon_spec.rb new/yast2-registration-4.3.12/test/addon_spec.rb --- old/yast2-registration-4.3.10/test/addon_spec.rb 2020-10-08 08:03:04.000000000 +0200 +++ new/yast2-registration-4.3.12/test/addon_spec.rb 2020-10-21 10:35:30.000000000 +0200 @@ -115,7 +115,8 @@ expected_output = [ "sle-module-basesystem", "sle-module-desktop-applications", "sle-module-legacy", "sle-module-public-cloud", "sle-ha", - "sle-module-development-tools", "sle-module-server-applications", "sle-we" + "sle-module-development-tools", "sle-module-server-applications", + "sle-we", "sle-we" ] expect(addons.size).to eq sorted_addons.size diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.10/test/autoyast_addons_spec.rb new/yast2-registration-4.3.12/test/autoyast_addons_spec.rb --- old/yast2-registration-4.3.10/test/autoyast_addons_spec.rb 2020-10-08 08:03:04.000000000 +0200 +++ new/yast2-registration-4.3.12/test/autoyast_addons_spec.rb 2020-10-21 10:35:30.000000000 +0200 @@ -32,6 +32,11 @@ ["name" => "non-existing-module", "version" => "42", "arch" => "x86_64"] end + # only addon name is given + let(:addons_only_name) do + [{ "name" => "sle-we" }] + end + # the addons to register in the expcted correct order let(:expected_registration_order) { ["sle-module-basesystem", "sle-module-desktop-applications"] } @@ -66,6 +71,16 @@ ayaddons = Registration::AutoyastAddons.new(missing_addons, registration) ayaddons.select end + + it "selects the newest available addon" do + expect(Yast::Arch).to receive(:architecture).twice.and_return("x86_64") + ayaddons = Registration::AutoyastAddons.new(addons_only_name, registration) + ayaddons.select + + addon = ayaddons.selected_addons.find { |a| a.identifier == addons_only_name.first["name"] } + expect(addon.identifier).to eq(addons_only_name.first["name"]) + expect(addon.version).to eq("16") + end end describe "#register" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.10/test/fixtures/sle15_addons.yaml new/yast2-registration-4.3.12/test/fixtures/sle15_addons.yaml --- old/yast2-registration-4.3.10/test/fixtures/sle15_addons.yaml 2020-10-08 08:03:04.000000000 +0200 +++ new/yast2-registration-4.3.12/test/fixtures/sle15_addons.yaml 2020-10-21 10:35:30.000000000 +0200 @@ -9,7 +9,7 @@ :identifier: sle-module-basesystem :former_identifier: sle-module-basesystem :version: '15' - :release_type: + :release_type: :arch: x86_64 :friendly_name: Basesystem Module 15 x86_64 (ALPHA) :product_class: 7261-ALPHA @@ -72,7 +72,7 @@ :identifier: sle-module-desktop-applications :former_identifier: sle-module-desktop-applications :version: '15' - :release_type: + :release_type: :arch: x86_64 :friendly_name: Desktop Applications Module 15 x86_64 (ALPHA) :product_class: 7261-ALPHA @@ -137,7 +137,7 @@ :identifier: sle-module-development-tools :former_identifier: sle-module-development-tools :version: '15' - :release_type: + :release_type: :arch: x86_64 :friendly_name: Development Tools Module 15 x86_64 (ALPHA) :product_class: 7261-ALPHA @@ -204,7 +204,7 @@ :identifier: sle-module-server-applications :former_identifier: sle-module-server-applications :version: '15' - :release_type: + :release_type: :arch: x86_64 :friendly_name: Server Applications Module 15 x86_64 (ALPHA) :product_class: 7261-ALPHA @@ -271,7 +271,7 @@ :identifier: sle-we :former_identifier: sle-we :version: '15' - :release_type: + :release_type: :arch: x86_64 :friendly_name: SUSE Linux Enterprise Workstation Extension 15 x86_64 (ALPHA) @@ -332,6 +332,74 @@ :recommended: false :extensions: [] modifiable: true + - &10 !ruby/object:SUSE::Connect::Remote::Product + table: + :id: 15831 + :name: SUSE Linux Enterprise Workstation Extension + :identifier: sle-we + :former_identifier: sle-we + :version: '16' + :release_type: + :arch: x86_64 + :friendly_name: SUSE Linux Enterprise Workstation Extension 16 x86_64 + (ALPHA) + :product_class: SLE-WE-ALPHA + :cpe: cpe:/o:suse:sle-we:16 + :free: false + :description: SUSE Linux Enterprise Workstation Extension extends the + functionality of SUSE Linux Enterprise Server with packages of SUSE + Linux Enterprise Desktop, like additional desktop applications (office + suite, email client, graphical editor ...) and libraries. It allows + to combine both products to create a full featured Workstation. + :release_stage: alpha + :eula_url: '' + :repositories: + - id: 2563 + url: https://updates.suse.com/SUSE/Products/SLE-WE/16/x86_64/product_source/ + name: SLE-WE16-Source-Pool + distro_target: sle-16-x86_64 + description: SLE-WE16-Source-Pool for sle-16-x86_64 + enabled: false + autorefresh: false + installer_updates: false + - id: 2562 + url: https://updates.suse.com/SUSE/Products/SLE-WE/16/x86_64/product_debug/ + name: SLE-WE16-Debuginfo-Pool + distro_target: sle-16-x86_64 + description: SLE-WE15-Debuginfo-Pool for sle-16-x86_64 + enabled: false + autorefresh: false + installer_updates: false + - id: 2561 + url: https://updates.suse.com/SUSE/Products/SLE-WE/16/x86_64/product/ + name: SLE-WE16-Pool + distro_target: sle-16-x86_64 + description: SLE-WE16-Pool for sle-16-x86_64 + enabled: true + autorefresh: false + installer_updates: false + - id: 2560 + url: https://updates.suse.com/SUSE/Updates/SLE-WE/16/x86_64/update_debug/ + name: SLE-WE15-Debuginfo-Updates + distro_target: sle-16-x86_64 + description: SLE-WE16-Debuginfo-Updates for sle-16-x86_64 + enabled: false + autorefresh: true + installer_updates: false + - id: 2559 + url: https://updates.suse.com/SUSE/Updates/SLE-WE/16/x86_64/update/ + name: SLE-WE16-Updates + distro_target: sle-16-x86_64 + description: SLE-WE16-Updates for sle-16-x86_64 + enabled: true + autorefresh: true + installer_updates: false + :product_type: extension + :predecessor_ids: [] + :shortname: SLEWE16 + :recommended: false + :extensions: [] + modifiable: true modifiable: true - &3 !ruby/object:SUSE::Connect::Remote::Product table: @@ -340,7 +408,7 @@ :identifier: sle-module-legacy :former_identifier: sle-module-legacy :version: '15' - :release_type: + :release_type: :arch: x86_64 :friendly_name: Legacy Module 15 x86_64 (ALPHA) :product_class: 7261-ALPHA @@ -410,7 +478,7 @@ :identifier: sle-module-public-cloud :former_identifier: sle-module-public-cloud :version: '15' - :release_type: + :release_type: :arch: x86_64 :friendly_name: Public Cloud Module 15 x86_64 (ALPHA) :product_class: 7261-ALPHA @@ -472,7 +540,7 @@ :identifier: sle-ha :former_identifier: sle-ha :version: '15' - :release_type: + :release_type: :arch: x86_64 :friendly_name: SUSE Linux Enterprise High Availability Extension 15 x86_64 (ALPHA) @@ -555,3 +623,6 @@ - !ruby/object:Registration::Addon pure_addon: *9 depends_on: *7 +- !ruby/object:Registration::Addon + pure_addon: *10 + depends_on: *7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.10/test/inst_scc_test.rb new/yast2-registration-4.3.12/test/inst_scc_test.rb --- old/yast2-registration-4.3.10/test/inst_scc_test.rb 2020-10-08 08:03:04.000000000 +0200 +++ new/yast2-registration-4.3.12/test/inst_scc_test.rb 2020-10-21 10:35:30.000000000 +0200 @@ -17,6 +17,7 @@ allow(Yast::Mode).to receive(:update).and_return(false) allow(Yast::SlpService).to receive(:all).and_return([]) allow(Y2Packager::MediumType).to receive(:online?).and_return(false) + allow(Registration::Addon).to receive(:find_all).and_return([]) end context "the system is already registered" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.10/test/scc_test.rb new/yast2-registration-4.3.12/test/scc_test.rb --- old/yast2-registration-4.3.10/test/scc_test.rb 2020-10-08 08:03:04.000000000 +0200 +++ new/yast2-registration-4.3.12/test/scc_test.rb 2020-10-21 10:35:30.000000000 +0200 @@ -23,6 +23,7 @@ context "the system is already registered" do before do expect(Registration::Registration).to receive(:is_registered?).and_return(true) + expect(Registration::Addon).to receive(:find_all).and_return([]) end it "returns :abort when closing the status dialog" do