Hello community,

here is the log from the commit of package yast2-packager for openSUSE:Factory 
checked in at 2017-04-12 17:09:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-packager.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-packager"

Wed Apr 12 17:09:56 2017 rev:334 rq:486448 version:3.2.22

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes    
2017-03-29 13:23:19.802986398 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes       
2017-04-12 17:09:58.748236865 +0200
@@ -1,0 +2,8 @@
+Fri Apr  7 13:40:59 UTC 2017 - [email protected]
+
+- Create the /etc/products.d/baseproduct symlink in inst-sys when
+  it is missing to allow expanding variables in the add-on
+  repositories URL (bsc#972046)
+- 3.2.22
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.fCDEXp/_old  2017-04-12 17:09:59.984061920 +0200
+++ /var/tmp/diff_new_pack.fCDEXp/_new  2017-04-12 17:09:59.984061920 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.2.21
+Version:        3.2.22
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-packager-3.2.21.tar.bz2 -> yast2-packager-3.2.22.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.2.21/package/yast2-packager.changes 
new/yast2-packager-3.2.22/package/yast2-packager.changes
--- old/yast2-packager-3.2.21/package/yast2-packager.changes    2017-03-28 
11:35:02.396202018 +0200
+++ new/yast2-packager-3.2.22/package/yast2-packager.changes    2017-04-07 
16:03:44.857887102 +0200
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Fri Apr  7 13:40:59 UTC 2017 - [email protected]
+
+- Create the /etc/products.d/baseproduct symlink in inst-sys when
+  it is missing to allow expanding variables in the add-on
+  repositories URL (bsc#972046)
+- 3.2.22
+
+-------------------------------------------------------------------
 Tue Mar 28 08:31:49 UTC 2017 - [email protected]
 
 - Do not crash when changing the priority of a just created
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.2.21/package/yast2-packager.spec 
new/yast2-packager-3.2.22/package/yast2-packager.spec
--- old/yast2-packager-3.2.21/package/yast2-packager.spec       2017-03-28 
11:35:02.396202018 +0200
+++ new/yast2-packager-3.2.22/package/yast2-packager.spec       2017-04-07 
16:03:44.857887102 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.2.21
+Version:        3.2.22
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.2.21/src/modules/Packages.rb 
new/yast2-packager-3.2.22/src/modules/Packages.rb
--- old/yast2-packager-3.2.21/src/modules/Packages.rb   2017-03-28 
11:35:02.408202018 +0200
+++ new/yast2-packager-3.2.22/src/modules/Packages.rb   2017-04-07 
16:03:45.005887102 +0200
@@ -8,6 +8,7 @@
 
 # html_escape()
 require "erb"
+require "fileutils"
 
 module Yast
   class PackagesClass < Module
@@ -40,6 +41,8 @@
       "SLES_SAP" => [ "SLES" ]
     }
 
+    BASE_PRODUCT_FILE = "/etc/products.d/baseproduct".freeze
+
     def main
       Yast.import "UI"
       Yast.import "Pkg"
@@ -1588,7 +1591,7 @@
 
       # Initialize package manager
       @init_error = nil
-      Builtins.y2milestone("Packages::Initialize()")
+      Builtins.y2milestone("Packages::Initialize_BaseInit()")
 
       if Mode.test
         # Fake values for testing purposes
@@ -1786,6 +1789,10 @@
       initial_repository = nil
       ImportGPGKeys()
 
+      # Create the baseproduct link if it does not exist yet,
+      # openSUSE includes the file in the inst-sys while SLES/SLED do not.
+      create_baseproduct_symlink unless File.exist?(BASE_PRODUCT_FILE)
+
       # prefer CD/DVD media to download during installation/update
       # (BNC#780617,865819)
       Builtins.y2milestone("Prefer CD/DVD media to download")
@@ -2747,6 +2754,22 @@
       return false unless  PRODUCT_CONFLICTS[product2]
        PRODUCT_CONFLICTS[product2].include?(product1)
     end
+
+    # Create the baseproduct file pointing to a found product file.
+    def create_baseproduct_symlink
+      prod_files = Dir["/etc/products.d/*.prod"]
+
+      if prod_files.empty?
+        log.warn("No product file found, not creating the baseproduct symlink")
+        return
+      end
+
+      log.warn("More than one product found: #{prod_files}") if 
prod_files.size > 1
+
+      product_file = prod_files.first
+      log.info("Creating #{BASE_PRODUCT_FILE} symlink pointing to 
#{product_file}")
+      ::FileUtils.ln_s(product_file, BASE_PRODUCT_FILE)
+    end
   end
 
   Packages = PackagesClass.new


Reply via email to