Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-packager for openSUSE:Factory 
checked in at 2024-03-15 20:27:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-packager.new.1905 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-packager"

Fri Mar 15 20:27:57 2024 rev:444 rq:1157997 version:5.0.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes    
2024-02-15 20:59:42.122520320 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new.1905/yast2-packager.changes  
2024-03-15 20:28:02.788933088 +0100
@@ -1,0 +2,13 @@
+Tue Mar 12 13:43:26 UTC 2024 - Ladislav Slezák <lsle...@suse.com>
+
+- Change the product mapping API to be the same as in SP5 and older
+  (related to bsc#1220567)
+- 5.0.5
+
+-------------------------------------------------------------------
+Thu Feb 22 09:34:54 UTC 2024 - Ladislav Slezák <lsle...@suse.com>
+
+- Display a better product summary for the SLE_HPC => SLES upgrade
+  (jsc#PED-7841)
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.ifxJyU/_old  2024-03-15 20:28:03.744968301 +0100
+++ /var/tmp/diff_new_pack.ifxJyU/_new  2024-03-15 20:28:03.744968301 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        5.0.4
+Version:        5.0.5
 Release:        0
 Summary:        YaST2 - Package Library
 License:        GPL-2.0-or-later
@@ -77,6 +77,8 @@
 Conflicts:      yast2-core < 2.15.10
 # NotEnoughMemory-related functions moved to misc.ycp import-file
 Conflicts:      yast2-add-on < 2.15.15
+# changed API in Y2Packager::ProductUpgrade and Yast::AddOnProduct
+Conflicts:      yast2-registration < 5.0.1
 
 # ensure that 'checkmedia' is on the medium
 Recommends:     checkmedia

++++++ yast2-packager-5.0.4.tar.bz2 -> yast2-packager-5.0.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-5.0.4/package/yast2-packager.changes 
new/yast2-packager-5.0.5/package/yast2-packager.changes
--- old/yast2-packager-5.0.4/package/yast2-packager.changes     2024-02-15 
10:18:50.000000000 +0100
+++ new/yast2-packager-5.0.5/package/yast2-packager.changes     2024-03-14 
14:23:09.000000000 +0100
@@ -1,4 +1,17 @@
 -------------------------------------------------------------------
+Tue Mar 12 13:43:26 UTC 2024 - Ladislav Slezák <lsle...@suse.com>
+
+- Change the product mapping API to be the same as in SP5 and older
+  (related to bsc#1220567)
+- 5.0.5
+
+-------------------------------------------------------------------
+Thu Feb 22 09:34:54 UTC 2024 - Ladislav Slezák <lsle...@suse.com>
+
+- Display a better product summary for the SLE_HPC => SLES upgrade
+  (jsc#PED-7841)
+
+-------------------------------------------------------------------
 Tue Feb 13 16:40:17 UTC 2024 - Ladislav Slezák <lsle...@suse.com>
 
 - SLE HPC is not a base product anymore, it is replaced by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-5.0.4/package/yast2-packager.spec 
new/yast2-packager-5.0.5/package/yast2-packager.spec
--- old/yast2-packager-5.0.4/package/yast2-packager.spec        2024-02-15 
10:18:50.000000000 +0100
+++ new/yast2-packager-5.0.5/package/yast2-packager.spec        2024-03-14 
14:23:09.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        5.0.4
+Version:        5.0.5
 Release:        0
 Summary:        YaST2 - Package Library
 License:        GPL-2.0-or-later
@@ -77,6 +77,8 @@
 Conflicts:      yast2-core < 2.15.10
 # NotEnoughMemory-related functions moved to misc.ycp import-file
 Conflicts:      yast2-add-on < 2.15.15
+# changed API in Y2Packager::ProductUpgrade and Yast::AddOnProduct
+Conflicts:      yast2-registration < 5.0.1
 
 # ensure that 'checkmedia' is on the medium
 Recommends:     checkmedia
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-5.0.4/src/lib/y2packager/product_upgrade.rb 
new/yast2-packager-5.0.5/src/lib/y2packager/product_upgrade.rb
--- old/yast2-packager-5.0.4/src/lib/y2packager/product_upgrade.rb      
2024-02-15 10:18:50.000000000 +0100
+++ new/yast2-packager-5.0.5/src/lib/y2packager/product_upgrade.rb      
2024-03-14 14:23:09.000000000 +0100
@@ -50,6 +50,8 @@
       # in the src/modules/AddOnProduct.rb file, maybe it needs an update as 
well...
     }.freeze
 
+    private_constant :MAPPING
+
     # This maps uses a list of installed products as the key and the removed 
products as a value.
     # All products in key have to be installed.
     # It is used in special cases when the removed product is still available 
on the medium
@@ -63,7 +65,18 @@
     }.freeze
     # rubocop:enable Layout/LineLength
 
+    private_constant :UPGRADE_REMOVAL_MAPPING
+
     class << self
+      # flag for using old or new product mapping, not used in SLE15-SP6+
+      attr_accessor :new_renames
+
+      def mapping
+        # no special handling, the mapping is static in SLE15-SP6+,
+        # in SLE15-SP5 it is dynamic depending on the installed version
+        MAPPING.dup
+      end
+
       # Find a new available base product which upgrades the installed base 
product.
       #
       # The workflow to find the new base product is:
@@ -115,18 +128,20 @@
         installed = Y2Packager::Product.installed_products.map(&:name)
         selected_products = 
Y2Packager::Product.with_status(:selected).map(&:name)
 
+        product_mapping = mapping
+
         # the "sort_by(&:size).reverse" part ensures we try first the longer
         # mappings (more installed products) to find more specific matches
-        old_products = MAPPING.keys.sort_by(&:size).reverse.find do |products|
+        old_products = product_mapping.keys.sort_by(&:size).reverse.find do 
|products|
           # the product is included in the mapping key and all product mapping 
key
           # products are installed and the replacement products are selected
           products.include?(old_product_name) && (products - installed).empty? 
&&
-            selected_products.include?(MAPPING[products])
+            selected_products.include?(product_mapping[products])
         end
 
         return [] unless old_products
 
-        [MAPPING[old_products]]
+        [product_mapping[old_products]]
       end
 
       # Returns the products which are upgraded by the solver but should be 
actually
@@ -175,18 +190,20 @@
       def find_by_mapping(available)
         installed = Y2Packager::Product.installed_products
 
+        product_mapping = mapping
+
         # sort the keys by length, try more products first
         # to find the most specific upgrade, prefer the
         # SLES + sle-module-hpc => SLE_HPC upgrade to plain SLES => SLES 
upgrade
         # (if that would be in the list)
-        upgrade = MAPPING.keys.sort_by(&:size).reverse.find do |keys|
+        upgrade = product_mapping.keys.sort_by(&:size).reverse.find do |keys|
           keys.all? { |name| installed.any? { |p| p.name == name } }
         end
 
         log.info("Fallback upgrade for products: #{upgrade.inspect}")
         return nil unless upgrade
 
-        name = MAPPING[upgrade]
+        name = product_mapping[upgrade]
         product = available.find { |p| p.name == name }
         log.info("New product: #{product}")
         product
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-5.0.4/src/modules/AddOnProduct.rb 
new/yast2-packager-5.0.5/src/modules/AddOnProduct.rb
--- old/yast2-packager-5.0.4/src/modules/AddOnProduct.rb        2024-02-15 
10:18:50.000000000 +0100
+++ new/yast2-packager-5.0.5/src/modules/AddOnProduct.rb        2024-03-14 
14:23:09.000000000 +0100
@@ -28,9 +28,9 @@
       # SLE12 HA GEO is now included in SLE15 HA
       "sle-ha-geo"                        => ["sle-ha"],
       "SUSE_SLES_SAP"                     => ["SLES_SAP"],
-      # SLE HPC is not a base product anymore, it is SLES + HPC module now
-      "SLE-HPC"                           => ["SLES", "sle-module-hpc"],
-      "SLE_HPC"                           => ["SLES", "sle-module-hpc"],
+      # SLE HPC is not a base product anymore, it is SLES (+ HPC module) now
+      "SLE-HPC"                           => ["SLES"],
+      "SLE_HPC"                           => ["SLES"],
       # SMT is now integrated into the base SLES
       "sle-smt"                           => ["SLES"],
       # Live patching is a module now (bsc#1074154)
@@ -51,6 +51,17 @@
       # in the src/lib/y2packager/product_upgrade.rb file, maybe it needs an 
update as well...
     }.freeze
 
+    private_constant :DEFAULT_PRODUCT_RENAMES
+
+    # flag for using old or new product mapping, not used in SLE15-SP6+
+    attr_accessor :new_renames
+
+    def default_product_renames
+      # no special handling, the product renames is a static map in SLE15-SP6+,
+      # in SLE15-SP5 it is dynamic depending on the installed version
+      DEFAULT_PRODUCT_RENAMES
+    end
+
     # @return [Hash] Product renames added externally through the #add_rename 
method
     attr_accessor :external_product_renames
     private :external_product_renames, :external_product_renames=
@@ -2014,7 +2025,7 @@
 
       # handle the product renames, if a renamed product was installed
       # replace it with the new product so the new product is preselected
-      DEFAULT_PRODUCT_RENAMES.each do |k, v|
+      default_product_renames.each do |k, v|
         next unless installed_addons.include?(k)
 
         installed_addons.delete(k)
@@ -2105,12 +2116,12 @@
 
     # Determine whether a product rename is included in the fallback map
     #
-    # @see DEFAULT_PRODUCT_RENAMES
+    # @see default_product_renames
     # @see #renamed_at?
     def renamed_by_default?(old_name, new_name)
       log.info "Search #{old_name} -> #{new_name} rename in default map: " \
-               "#{DEFAULT_PRODUCT_RENAMES.inspect}"
-      renamed_at?(DEFAULT_PRODUCT_RENAMES, old_name, new_name)
+               "#{default_product_renames.inspect}"
+      renamed_at?(default_product_renames, old_name, new_name)
     end
 
     # Determine whether a product rename is present on a given hash

Reply via email to