Hello community,

here is the log from the commit of package autoyast2 for openSUSE:Factory 
checked in at 2014-05-13 20:46:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/autoyast2 (Old)
 and      /work/SRC/openSUSE:Factory/.autoyast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "autoyast2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/autoyast2/autoyast2.changes      2014-05-06 
13:40:25.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.autoyast2.new/autoyast2.changes 2014-05-13 
20:46:02.000000000 +0200
@@ -1,0 +2,8 @@
+Mon May 12 15:12:12 CEST 2014 - [email protected]
+
+- Reading software and partition selections before generating
+  the autoyast configuration file.
+  (bnc#869175)
+- 3.1.25 
+
+-------------------------------------------------------------------

Old:
----
  autoyast2-3.1.24.tar.bz2

New:
----
  autoyast2-3.1.25.tar.bz2

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

Other differences:
------------------
++++++ autoyast2.spec ++++++
--- /var/tmp/diff_new_pack.kBpLED/_old  2014-05-13 20:46:03.000000000 +0200
+++ /var/tmp/diff_new_pack.kBpLED/_new  2014-05-13 20:46:03.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           autoyast2
-Version:        3.1.24
+Version:        3.1.25
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ autoyast2-3.1.24.tar.bz2 -> autoyast2-3.1.25.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-3.1.24/package/autoyast2.changes 
new/autoyast2-3.1.25/package/autoyast2.changes
--- old/autoyast2-3.1.24/package/autoyast2.changes      2014-04-22 
10:35:43.000000000 +0200
+++ new/autoyast2-3.1.25/package/autoyast2.changes      2014-05-12 
15:30:46.000000000 +0200
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Mon May 12 15:12:12 CEST 2014 - [email protected]
+
+- Reading software and partition selections before generating
+  the autoyast configuration file.
+  (bnc#869175)
+- 3.1.25 
+
+-------------------------------------------------------------------
 Tue Apr 22 10:17:55 CEST 2014 - [email protected]
 
 - Replaced old Product.patterns with new Packages.default_patterns
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-3.1.24/package/autoyast2.spec 
new/autoyast2-3.1.25/package/autoyast2.spec
--- old/autoyast2-3.1.24/package/autoyast2.spec 2014-04-22 10:35:43.000000000 
+0200
+++ new/autoyast2-3.1.25/package/autoyast2.spec 2014-05-12 15:30:46.000000000 
+0200
@@ -17,7 +17,7 @@
 
 
 Name:           autoyast2
-Version:        3.1.24
+Version:        3.1.25
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-3.1.24/src/modules/AutoinstClone.rb 
new/autoyast2-3.1.25/src/modules/AutoinstClone.rb
--- old/autoyast2-3.1.24/src/modules/AutoinstClone.rb   2014-04-22 
10:35:43.000000000 +0200
+++ new/autoyast2-3.1.25/src/modules/AutoinstClone.rb   2014-05-12 
15:30:46.000000000 +0200
@@ -97,8 +97,16 @@
         resource
       )
 
-      Call.Function(auto, ["Read"])
-      Call.Function(auto, ["SetModified"])
+      # Do not read settings from system in first stage, autoyast profile
+      # should contain only proposed and user modified values.
+      # Exception: Storage and software module have autoyast modules which are
+      #            defined in autoyast itself.
+      #            So, these modules have to be called.
+      if !Stage.initial ||
+        ["software_auto", "storage_auto"].include?(auto)
+        Call.Function(auto, ["Read"])
+        Call.Function(auto, ["SetModified"])
+      end
 
       true
     end
@@ -173,21 +181,17 @@
       Profile.prepare = true
       Mode.SetMode("autoinst_config")
 
-      # do not read settings from system in first stage, autoyast profile
-      # should contain only proposed and user modified values
-      if !Stage.initial
-        Builtins.foreach(Y2ModuleConfig.ModuleMap) do |def_resource, 
resourceMap|
-          # Set resource name, if not using default value
-          resource = Ops.get_string(
-            resourceMap,
-            "X-SuSE-YaST-AutoInstResource",
-            ""
-          )
-          resource = def_resource if resource == ""
-          Builtins.y2debug("current resource: %1", resource)
-          if Builtins.contains(@additional, resource)
-            ret = CommonClone(def_resource, resourceMap)
-          end
+      Builtins.foreach(Y2ModuleConfig.ModuleMap) do |def_resource, resourceMap|
+        # Set resource name, if not using default value
+        resource = Ops.get_string(
+          resourceMap,
+          "X-SuSE-YaST-AutoInstResource",
+          ""
+        )
+        resource = def_resource if resource == ""
+        Builtins.y2debug("current resource: %1", resource)
+        if Builtins.contains(@additional, resource)
+          ret = CommonClone(def_resource, resourceMap)
         end
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-3.1.24/src/modules/AutoinstSoftware.rb 
new/autoyast2-3.1.25/src/modules/AutoinstSoftware.rb
--- old/autoyast2-3.1.24/src/modules/AutoinstSoftware.rb        2014-04-22 
10:35:43.000000000 +0200
+++ new/autoyast2-3.1.25/src/modules/AutoinstSoftware.rb        2014-05-12 
15:30:46.000000000 +0200
@@ -939,6 +939,7 @@
     end
 
     # Return list of software packages of calling client
+    # in the installed environment
     # @return [Hash] map of installed software package
     #          "patterns" -> list<string> addon selections
     #          "packages" -> list<string> user selected packages
@@ -1067,8 +1068,44 @@
       deep_copy(software)
     end
 
+    # Return list of software packages, patterns which have been selected
+    # by the user and have to be installed or removed.
+    # The evaluation will be called while the yast installation workflow.
+    # @return [Hash] map of to be installed/removed packages/patterns
+    #          "patterns" -> list<string> of selected patterns
+    #          "packages" -> list<string> user selected packages
+    #           "remove-packages" -> list<string> packages to remove
+    def read_initial_stage
+      install_patterns = Pkg.ResolvableProperties("", :pattern, "").collect do 
|pattern|
+        if pattern["status"] == :selected && pattern["transact_by"] == :user
+          pattern["name"]
+        end
+      end
+
+      install_packages = Pkg.FilterPackages(
+        solver_selected = false,
+        app_selected = false,
+        user_selected = true,
+        name_only = true)
+
+      remove_packages = Pkg.ResolvableProperties("", :package, "").collect do 
|package|
+        if package["transact_by"] == :user &&
+          (package["locked"] == true ||
+           package["status"] == :available) #weak lock
+          package["name"]
+        end
+      end
+
+      software = {}
+      software["packages"] = install_packages
+      software["patterns"] = install_patterns.compact
+      software["remove-packages"] = remove_packages.compact
+      Builtins.y2milestone("autoyast software selection: %1", software)
+      deep_copy(software)
+    end
+
     def Read
-      Import(ReadHelper())
+      Import((Stage.initial ? read_initial_stage() : ReadHelper()))
     end
 
     publish :variable => :Software, :type => "map"

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to