Hello community,

here is the log from the commit of package yast2-add-on for openSUSE:Factory 
checked in at 2020-09-18 14:34:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-add-on (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-add-on.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-add-on"

Fri Sep 18 14:34:35 2020 rev:110 rq:835225 version:4.3.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-add-on/yast2-add-on.changes        
2020-08-14 13:09:18.601209761 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-add-on.new.4249/yast2-add-on.changes      
2020-09-18 14:36:40.115748959 +0200
@@ -1,0 +2,14 @@
+Thu Sep 17 13:06:05 UTC 2020 - Ladislav Slezák <[email protected]>
+
+- Do not skip the Full medium add-on selection when a driver update
+  disk (DUD) is used (bsc#1174562)
+- 4.3.6
+
+-------------------------------------------------------------------
+Wed Sep 16 12:22:10 UTC 2020 - Ladislav Slezák <[email protected]>
+
+- Fixed regression in the add-on repository names in AutoYaST
+  installation (bsc#1175374, related to bsc#1172477)
+- 4.3.5
+
+-------------------------------------------------------------------

Old:
----
  yast2-add-on-4.3.4.tar.bz2

New:
----
  yast2-add-on-4.3.6.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-add-on.spec ++++++
--- /var/tmp/diff_new_pack.bMZdLH/_old  2020-09-18 14:36:43.831752275 +0200
+++ /var/tmp/diff_new_pack.bMZdLH/_new  2020-09-18 14:36:43.835752278 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-add-on
 #
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,17 +12,17 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           yast2-add-on
-Version:        4.3.4
+Version:        4.3.6
 Release:        0
 Summary:        YaST2 - Add-On media installation code
 License:        GPL-2.0-only
 Group:          System/YaST
-Url:            https://github.com/yast/yast-add-on
+URL:            https://github.com/yast/yast-add-on
 
 Source0:        %{name}-%{version}.tar.bz2
 
@@ -41,6 +41,8 @@
 Requires:       yast2-installation
 # Packager ProductLicense#HandleLicenseDialogRet allowing "refuse" action
 Requires:       yast2-packager >= 4.2.16
+# "raw_name" in Pkg.SourceEditGet/Set()
+Requires:       yast2-pkg-bindings >= 4.2.8
 Requires:       yast2-ruby-bindings >= 1.0.0
 
 Obsoletes:      yast2-add-on-devel-doc

++++++ yast2-add-on-4.3.4.tar.bz2 -> yast2-add-on-4.3.6.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-add-on-4.3.4/.rubocop.yml 
new/yast2-add-on-4.3.6/.rubocop.yml
--- old/yast2-add-on-4.3.4/.rubocop.yml 2020-08-12 12:08:47.000000000 +0200
+++ new/yast2-add-on-4.3.6/.rubocop.yml 2020-09-17 16:08:06.000000000 +0200
@@ -95,3 +95,10 @@
     - 'src/include/add-on/misc.rb'
     - 'src/lib/add-on/clients/add-on_auto.rb'
     - 'src/modules/AddOnOthers.rb'
+
+Style/ClassVars:
+  Exclude:
+    # we really want to have a single global flag there
+    # (even for derived classes)
+    # https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/ClassVars
+    - 'src/include/add-on/add-on-workflow.rb'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-add-on-4.3.4/package/yast2-add-on.changes 
new/yast2-add-on-4.3.6/package/yast2-add-on.changes
--- old/yast2-add-on-4.3.4/package/yast2-add-on.changes 2020-08-12 
12:08:47.000000000 +0200
+++ new/yast2-add-on-4.3.6/package/yast2-add-on.changes 2020-09-17 
16:08:06.000000000 +0200
@@ -1,4 +1,18 @@
 -------------------------------------------------------------------
+Thu Sep 17 13:06:05 UTC 2020 - Ladislav Slezák <[email protected]>
+
+- Do not skip the Full medium add-on selection when a driver update
+  disk (DUD) is used (bsc#1174562)
+- 4.3.6
+
+-------------------------------------------------------------------
+Wed Sep 16 12:22:10 UTC 2020 - Ladislav Slezák <[email protected]>
+
+- Fixed regression in the add-on repository names in AutoYaST
+  installation (bsc#1175374, related to bsc#1172477)
+- 4.3.5
+
+-------------------------------------------------------------------
 Mon Aug 10 17:28:28 CEST 2020 - [email protected]
 
 - AutoYaST: Added supplements: autoyast(add-on) into the spec file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-add-on-4.3.4/package/yast2-add-on.spec 
new/yast2-add-on-4.3.6/package/yast2-add-on.spec
--- old/yast2-add-on-4.3.4/package/yast2-add-on.spec    2020-08-12 
12:08:47.000000000 +0200
+++ new/yast2-add-on-4.3.6/package/yast2-add-on.spec    2020-09-17 
16:08:06.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-add-on
-Version:        4.3.4
+Version:        4.3.6
 Release:        0
 Summary:        YaST2 - Add-On media installation code
 License:        GPL-2.0-only
@@ -41,6 +41,8 @@
 Requires:       yast2-installation
 # Packager ProductLicense#HandleLicenseDialogRet allowing "refuse" action
 Requires:       yast2-packager >= 4.2.16
+# "raw_name" in Pkg.SourceEditGet/Set()
+Requires:       yast2-pkg-bindings >= 4.2.8
 Requires:       yast2-ruby-bindings >= 1.0.0
 
 Obsoletes:      yast2-add-on-devel-doc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-add-on-4.3.4/src/include/add-on/add-on-workflow.rb 
new/yast2-add-on-4.3.6/src/include/add-on/add-on-workflow.rb
--- old/yast2-add-on-4.3.4/src/include/add-on/add-on-workflow.rb        
2020-08-12 12:08:47.000000000 +0200
+++ new/yast2-add-on-4.3.6/src/include/add-on/add-on-workflow.rb        
2020-09-17 16:08:06.000000000 +0200
@@ -20,6 +20,9 @@
   module AddOnAddOnWorkflowInclude
     include Yast::Logger
 
+    # remember that the Full medium add-ons have been selected by user
+    @@media_addons_selected = false
+
     def initialize_add_on_add_on_workflow(include_target)
       Yast.import "UI"
       Yast.import "Pkg"
@@ -916,7 +919,7 @@
       # FATE #301928 - Saving one click
       # Bugzilla #893103 be consistent, so always when there is no add-on skip
       # Bugzilla #1102705 Do not redraw when skipping
-      if no_addons
+      if no_addons || (offline_medium? && !media_addons_selected?)
         Builtins.y2milestone("Skipping to media_select")
         ret = :skip_to_add
       else
@@ -1034,6 +1037,9 @@
             # Release all sources after adding a new one
             # because of CD/DVD + url cd://
             Pkg.SourceReleaseAll
+
+            # do not ask again for Full medium addons
+            media_addons_selected if offline_medium?
           elsif ret2 == :cancel
             log.info("Aborted, removing add-on repositories: 
#{@added_repos.inspect}")
 
@@ -1892,7 +1898,8 @@
     # @return [Boolean] `true` if the addons should be offered automatically
     #
     def offer_media_addons?
-      return false if !AddOnProduct.add_on_products.empty? || !Stage.initial 
|| !Y2Packager::MediumType.offline?
+      # media addons already selected or not Full medium
+      return false if media_addons_selected? || !offline_medium?
 
       # check the registration status, be careful that the registration might 
be
       # missing in the inst-sys (like on the openSUSE Leap media)
@@ -1924,5 +1931,23 @@
       # fallback to the internal product name
       selected_product&.display_name || product
     end
+
+    # Have been the Full media addons selected?
+    # @return [Boolean] true if the add-on selection dialog has been displayed
+    def media_addons_selected?
+      @@media_addons_selected
+    end
+
+    # Mark the media addons as selected
+    # @param value [Boolean] the selection status
+    def media_addons_selected(value = true)
+      @@media_addons_selected = value
+    end
+
+    # Running installation using the offline (Full) medium?
+    # @return [Boolean] true if offline installation is running
+    def offline_medium?
+      Stage.initial && Y2Packager::MediumType.offline?
+    end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-add-on-4.3.4/src/lib/add-on/clients/add-on_auto.rb 
new/yast2-add-on-4.3.6/src/lib/add-on/clients/add-on_auto.rb
--- old/yast2-add-on-4.3.4/src/lib/add-on/clients/add-on_auto.rb        
2020-08-12 12:08:47.000000000 +0200
+++ new/yast2-add-on-4.3.6/src/lib/add-on/clients/add-on_auto.rb        
2020-09-17 16:08:06.000000000 +0200
@@ -314,10 +314,10 @@
 
       return if repo.nil?
 
-      repo["name"] = preferred_name_for(add_on, repo)
+      repo["raw_name"] = preferred_name_for(add_on, repo)
       repo["priority"] = add_on["priority"] if add_on.key?("priority")
 
-      log.info("Preferred name: #{repo["name"]}")
+      log.info("Preferred name: #{repo["raw_name"]}")
 
       Pkg.SourceEditSet(sources)
     end
@@ -331,7 +331,7 @@
     #   * name of given repo
     #
     # @param [Hash] addon
-    # @param [Array] repo
+    # @param [Hash] repo
     #
     # @return [String] preferred name for add-on/repo
     def preferred_name_for(add_on, repo)
@@ -349,7 +349,7 @@
       found_repo = repos_at_url.find { |r| r[1] == product_dir }
       return found_repo[0] if found_repo
 
-      repo["name"]
+      repo["raw_name"]
     end
 
     # Installs given product
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-add-on-4.3.4/test/add-on-workflow_test.rb 
new/yast2-add-on-4.3.6/test/add-on-workflow_test.rb
--- old/yast2-add-on-4.3.4/test/add-on-workflow_test.rb 2020-08-12 
12:08:47.000000000 +0200
+++ new/yast2-add-on-4.3.6/test/add-on-workflow_test.rb 2020-09-17 
16:08:06.000000000 +0200
@@ -9,6 +9,9 @@
   include Yast::AddOnAddOnWorkflowInclude
 end
 
+Yast.import "AddOnProduct"
+Yast.import "SourceDialogs"
+
 describe Yast::AddOnAddOnWorkflowInclude do
   subject { AddOnAddOnWorkflowIncludeTest.new }
 
@@ -31,6 +34,11 @@
         allow(subject).to receive(:require).with("registration/registration")
       end
 
+      after do
+        # reset the changed flag back (for the other tests)
+        
Yast::AddOnAddOnWorkflowInclude.class_variable_set(:@@media_addons_selected, 
false)
+      end
+
       context "not registered" do
         let(:registered?) { false }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-add-on-4.3.4/test/repositories_include_test.rb 
new/yast2-add-on-4.3.6/test/repositories_include_test.rb
--- old/yast2-add-on-4.3.4/test/repositories_include_test.rb    2020-08-12 
12:08:47.000000000 +0200
+++ new/yast2-add-on-4.3.6/test/repositories_include_test.rb    2020-09-17 
16:08:06.000000000 +0200
@@ -133,4 +133,53 @@
       AddonIncludeTester.RunAddProductWorkflow
     end
   end
+
+  describe "#RunAddOnMainDialog" do
+    before do
+      allow(Yast::Pkg).to receive(:SourceReleaseAll)
+      allow(Yast::Stage).to receive(:initial).and_return(true)
+      allow(AddonIncludeTester).to 
receive(:HasInsufficientMemory).and_return(false)
+      allow(Yast::WorkflowManager).to receive(:SetBaseWorkflow)
+      allow(Yast::Wizard).to receive(:SetTitleIcon)
+      allow(AddonIncludeTester).to receive(:Redraw)
+      allow(Yast::AddOnProduct).to receive(:PrepareForRegistration)
+      allow(Yast::AddOnProduct).to receive(:Integrate)
+      allow(Yast::AddOnProduct).to receive(:ProcessRegistration)
+      allow(Yast::AddOnProduct).to receive(:ReIntegrateFromScratch)
+      allow(Yast::Wizard).to receive(:RestoreBackButton)
+      allow(Yast::Wizard).to receive(:RestoreAbortButton)
+      allow(Yast::Wizard).to receive(:RestoreNextButton)
+      allow(Yast::UI).to receive(:UserInput).and_return(:next)
+    end
+
+    after do
+      # reset the changed flag back (for the other tests)
+      
Yast::AddOnAddOnWorkflowInclude.class_variable_set(:@@media_addons_selected, 
false)
+    end
+
+    context "a DUD add-on present, using Full medium" do
+      before do
+        allow(Yast::AddOnProduct).to receive(:add_on_products).and_return(
+          [
+            {
+              "media"            => 4,
+              "product"          => "Driver Update 0",
+              "autoyast_product" => "Driver Update 0",
+              "media_url"        => 
"dir:///update/000/repo?alias=DriverUpdate0",
+              "product_dir"      => "",
+              "priority"         => 50
+            }
+          ]
+        )
+        allow(Y2Packager::MediumType).to receive(:offline?).and_return(true)
+      end
+
+      it "asks for the media addons and stores the state" do
+        expect(AddonIncludeTester).to receive(:RunWizard).and_return(:next)
+        expect { AddonIncludeTester.RunAddOnMainDialog(true, true, true, "", 
"", "", true) }.to \
+          change { 
Yast::AddOnAddOnWorkflowInclude.class_variable_get(:@@media_addons_selected) } \
+          .from(false).to(true)
+      end
+    end
+  end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-add-on-4.3.4/test/y2add_on/clients/add-on_auto_test.rb 
new/yast2-add-on-4.3.6/test/y2add_on/clients/add-on_auto_test.rb
--- old/yast2-add-on-4.3.4/test/y2add_on/clients/add-on_auto_test.rb    
2020-08-12 12:08:47.000000000 +0200
+++ new/yast2-add-on-4.3.6/test/y2add_on/clients/add-on_auto_test.rb    
2020-09-17 16:08:06.000000000 +0200
@@ -306,7 +306,8 @@
             "autorefresh"  => true,
             "enabled"      => true,
             "keeppackaged" => false,
-            "name"         => "Updated repo",
+            "name"         => "repo_to_be_updated",
+            "raw_name"     => "Updated repo",
             "priority"     => 20,
             "service"      => ""
           },


Reply via email to