Hello community,

here is the log from the commit of package yast2-packager for openSUSE:Factory 
checked in at 2019-10-03 14:06:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-packager.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-packager"

Thu Oct  3 14:06:44 2019 rev:380 rq:734498 version:4.2.30

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes    
2019-09-23 13:16:43.241112457 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new.2352/yast2-packager.changes  
2019-10-03 14:06:51.472501839 +0200
@@ -1,0 +2,19 @@
+Tue Oct  1 17:13:42 UTC 2019 - Ladislav Slezák <[email protected]>
+
+- Do not add an empty repository from the offline medium root
+  (jsc#SLE-7101)
+- 4.2.30
+
+-------------------------------------------------------------------
+Tue Oct  1 07:52:29 UTC 2019 - Ladislav Slezák <[email protected]>
+
+- Small refactoring related to the offline medium (jsc#SLE-7101)
+- 4.2.29
+
+-------------------------------------------------------------------
+Fri Sep 27 15:21:37 UTC 2019 - Ladislav Slezák <[email protected]>
+
+- Support for the offline installation medium (jsc#SLE-7101)
+- 4.2.28
+
+-------------------------------------------------------------------

Old:
----
  yast2-packager-4.2.27.tar.bz2

New:
----
  yast2-packager-4.2.30.tar.bz2

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

Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.QrFvpx/_old  2019-10-03 14:06:52.252499833 +0200
+++ /var/tmp/diff_new_pack.QrFvpx/_new  2019-10-03 14:06:52.252499833 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        4.2.27
+Version:        4.2.30
 Release:        0
 Summary:        YaST2 - Package Library
 License:        GPL-2.0-or-later

++++++ yast2-packager-4.2.27.tar.bz2 -> yast2-packager-4.2.30.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-4.2.27/package/yast2-packager.changes 
new/yast2-packager-4.2.30/package/yast2-packager.changes
--- old/yast2-packager-4.2.27/package/yast2-packager.changes    2019-09-20 
11:36:49.000000000 +0200
+++ new/yast2-packager-4.2.30/package/yast2-packager.changes    2019-10-02 
10:27:03.000000000 +0200
@@ -1,4 +1,23 @@
 -------------------------------------------------------------------
+Tue Oct  1 17:13:42 UTC 2019 - Ladislav Slezák <[email protected]>
+
+- Do not add an empty repository from the offline medium root
+  (jsc#SLE-7101)
+- 4.2.30
+
+-------------------------------------------------------------------
+Tue Oct  1 07:52:29 UTC 2019 - Ladislav Slezák <[email protected]>
+
+- Small refactoring related to the offline medium (jsc#SLE-7101)
+- 4.2.29
+
+-------------------------------------------------------------------
+Fri Sep 27 15:21:37 UTC 2019 - Ladislav Slezák <[email protected]>
+
+- Support for the offline installation medium (jsc#SLE-7101)
+- 4.2.28
+
+-------------------------------------------------------------------
 Wed Sep 18 11:28:23 UTC 2019 - Ladislav Slezák <[email protected]>
 
 - Support for the online installation medium (jsc#SLE-7214)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-4.2.27/package/yast2-packager.spec 
new/yast2-packager-4.2.30/package/yast2-packager.spec
--- old/yast2-packager-4.2.27/package/yast2-packager.spec       2019-09-20 
11:36:49.000000000 +0200
+++ new/yast2-packager-4.2.30/package/yast2-packager.spec       2019-10-02 
10:27:03.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        4.2.27
+Version:        4.2.30
 Release:        0
 Summary:        YaST2 - Package Library
 License:        GPL-2.0-or-later
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-4.2.27/src/lib/y2packager/clients/inst_product_license.rb 
new/yast2-packager-4.2.30/src/lib/y2packager/clients/inst_product_license.rb
--- 
old/yast2-packager-4.2.27/src/lib/y2packager/clients/inst_product_license.rb    
    2019-09-20 11:36:49.000000000 +0200
+++ 
new/yast2-packager-4.2.30/src/lib/y2packager/clients/inst_product_license.rb    
    2019-10-02 10:27:03.000000000 +0200
@@ -80,6 +80,10 @@
         if Y2Packager::MediumType.online?
           # in an online installation read the products from the control.xml
           Y2Packager::ProductControlProduct.products.size > 1
+        elsif Y2Packager::MediumType.offline?
+          # the offline medium always contains several products, but they are
+          # in separate sub-repositories so we cannot see them in libzypp
+          true
         else
           # otherwise read the products from the medium
           Y2Packager::Product.available_base_products.size > 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-4.2.27/src/lib/y2packager/dialogs/addon_selector.rb 
new/yast2-packager-4.2.30/src/lib/y2packager/dialogs/addon_selector.rb
--- old/yast2-packager-4.2.27/src/lib/y2packager/dialogs/addon_selector.rb      
2019-09-20 11:36:49.000000000 +0200
+++ new/yast2-packager-4.2.30/src/lib/y2packager/dialogs/addon_selector.rb      
2019-10-02 10:27:03.000000000 +0200
@@ -45,7 +45,7 @@
         @products = products
         # do not offer base products, they would conflict with the already 
selected base product,
         # allow a hidden way to force displaying them in some special cases
-        @products.reject! { |p| p.details&.base } if 
!ENV["Y2_DISPLAY_BASE_PRODUCTS"] == "1"
+        @products.reject! { |p| p.details&.base } if 
ENV["Y2_DISPLAY_BASE_PRODUCTS"] != "1"
         @selected_products = []
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-4.2.27/src/lib/y2packager/product_location.rb 
new/yast2-packager-4.2.30/src/lib/y2packager/product_location.rb
--- old/yast2-packager-4.2.27/src/lib/y2packager/product_location.rb    
2019-09-20 11:36:49.000000000 +0200
+++ new/yast2-packager-4.2.30/src/lib/y2packager/product_location.rb    
2019-10-02 10:27:03.000000000 +0200
@@ -15,6 +15,7 @@
 require "y2packager/repomd_downloader"
 require "y2packager/solvable_pool"
 require "y2packager/product_finder"
+require "y2packager/resolvable"
 
 Yast.import "URL"
 
@@ -97,5 +98,23 @@
 
       details.summary
     end
+
+    alias_method :label, :summary
+
+    # Just forward to the details object to easily use the 
Y2Packager::PRODUCT_SORTER
+    # @return [Integer,nil] Product order, `nil` if not defined
+    def order
+      details&.order
+    end
+
+    # Is the product selected to install?
+    #
+    # @return [Boolean,nil] `true` if the product is selected to install, 
`false` otherwise,
+    #   `nil` if the product name is not set
+    def selected?
+      return nil unless details
+
+      Y2Packager::Resolvable.any?(kind: :product, name: details.product, 
status: :selected)
+    end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-4.2.27/src/modules/Packages.rb 
new/yast2-packager-4.2.30/src/modules/Packages.rb
--- old/yast2-packager-4.2.27/src/modules/Packages.rb   2019-09-20 
11:36:49.000000000 +0200
+++ new/yast2-packager-4.2.30/src/modules/Packages.rb   2019-10-02 
10:27:03.000000000 +0200
@@ -7,6 +7,7 @@
 require "cgi"
 require "shellwords"
 
+require "y2packager/medium_type"
 require "y2packager/product_upgrade"
 require "y2packager/resolvable"
 
@@ -1725,6 +1726,11 @@
       if !meta_data_present?(base_url, product_dir)
         log.info "Metadata not found at #{log_url}, postponing the repository 
initialization"
         return
+      # TODO: the offline medium contains an empty repository in the root,
+      # that should be removed in the future, remove this workaround as well
+      elsif Y2Packager::MediumType.offline? && product_dir == "/"
+        log.info "Ignoring the root repository on the offline medium"
+        return
       end
 
       initial_repository = nil
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-4.2.27/test/lib/clients/inst_product_license_test.rb 
new/yast2-packager-4.2.30/test/lib/clients/inst_product_license_test.rb
--- old/yast2-packager-4.2.27/test/lib/clients/inst_product_license_test.rb     
2019-09-20 11:36:49.000000000 +0200
+++ new/yast2-packager-4.2.30/test/lib/clients/inst_product_license_test.rb     
2019-10-02 10:27:03.000000000 +0200
@@ -32,6 +32,7 @@
     allow(Y2Packager::Product).to 
receive(:available_base_products).and_return(products)
     allow(Yast::Mode).to receive(:auto).and_return(auto)
     allow(Y2Packager::MediumType).to receive(:online?).and_return(false)
+    allow(Y2Packager::MediumType).to receive(:offline?).and_return(false)
     stub_const("Yast::Language", language)
   end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-4.2.27/test/lib/clients/inst_repositories_initialization_test.rb
 
new/yast2-packager-4.2.30/test/lib/clients/inst_repositories_initialization_test.rb
--- 
old/yast2-packager-4.2.27/test/lib/clients/inst_repositories_initialization_test.rb
 2019-09-20 11:36:49.000000000 +0200
+++ 
new/yast2-packager-4.2.30/test/lib/clients/inst_repositories_initialization_test.rb
 2019-10-02 10:27:03.000000000 +0200
@@ -20,6 +20,7 @@
       allow(Y2Packager::Product).to 
receive(:available_base_products).and_return(products)
       allow(Y2Packager::SelfUpdateAddonRepo).to 
receive(:present?).and_return(false)
       allow(Y2Packager::MediumType).to receive(:online?).and_return(false)
+      allow(Y2Packager::MediumType).to receive(:offline?).and_return(false)
     end
 
     it "initializes Packages subsystem" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-4.2.27/test/product_location_test.rb 
new/yast2-packager-4.2.30/test/product_location_test.rb
--- old/yast2-packager-4.2.27/test/product_location_test.rb     2019-09-20 
11:36:49.000000000 +0200
+++ new/yast2-packager-4.2.30/test/product_location_test.rb     2019-10-02 
10:27:03.000000000 +0200
@@ -119,4 +119,38 @@
       end
     end
   end
+
+  describe "#label" do
+    subject { described_class.new("foo", "/dir/foo", product: product) }
+    let(:product) { instance_double(Y2Packager::ProductLocationDetails, 
summary: "summary") }
+
+    it "returns the summary content" do
+      expect(subject.label).to eq("summary")
+    end
+  end
+
+  describe "#selected?" do
+    subject { described_class.new("foo", "/dir/foo", product: product) }
+    let(:product) { instance_double(Y2Packager::ProductLocationDetails, 
product: "product") }
+
+    before do
+      expect(Y2Packager::Resolvable).to receive(:any?)
+        .with(kind: :product, name: "product", status: :selected)
+        .and_return(product_selected)
+    end
+
+    context "product selected" do
+      let(:product_selected) { true }
+      it "returns true" do
+        expect(subject.selected?).to eq(true)
+      end
+    end
+
+    context "product not selected" do
+      let(:product_selected) { false }
+      it "returns false" do
+        expect(subject.selected?).to eq(false)
+      end
+    end
+  end
 end


Reply via email to