Hello community,

here is the log from the commit of package autoyast2 for openSUSE:Factory 
checked in at 2020-01-04 19:20:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/autoyast2 (Old)
 and      /work/SRC/openSUSE:Factory/.autoyast2.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "autoyast2"

Sat Jan  4 19:20:51 2020 rev:268 rq:760162 version:4.2.26

Changes:
--------
--- /work/SRC/openSUSE:Factory/autoyast2/autoyast2.changes      2019-12-14 
12:05:28.883382128 +0100
+++ /work/SRC/openSUSE:Factory/.autoyast2.new.6675/autoyast2.changes    
2020-01-04 19:21:01.173128685 +0100
@@ -1,0 +2,21 @@
+Tue Dec 31 11:43:56 UTC 2019 - Josef Reidinger <[email protected]>
+
+- Fix cloning patterns (regression from 4.2.22)
+  (bsc#1159269, bsc#1159472)
+- 4.2.26
+
+-------------------------------------------------------------------
+Tue Dec 17 16:19:57 UTC 2019 - Imobach Gonzalez Sosa <[email protected]>
+
+- Fixed conflicting items in rule dialogs (bsc#1123091).
+- Semi-automatic with partition: Do not use the common AY partition
+  workflow (bsc#1134501).
+- Do not reset Base-Product while registration. Do not call
+  registration in the second installation stage again.
+  (bsc#1143106).
+- Fix profile validation for scripts elements (bsc#1156905).
+- UI: Report XML parsing errors instead of just crashing
+  (bsc#1159157).
+- 4.2.25
+
+-------------------------------------------------------------------

Old:
----
  autoyast2-4.2.24.tar.bz2

New:
----
  autoyast2-4.2.26.tar.bz2

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

Other differences:
------------------
++++++ autoyast2.spec ++++++
--- /var/tmp/diff_new_pack.xclzNL/_old  2020-01-04 19:21:01.685128912 +0100
+++ /var/tmp/diff_new_pack.xclzNL/_new  2020-01-04 19:21:01.685128912 +0100
@@ -22,7 +22,7 @@
 %endif
 
 Name:           autoyast2
-Version:        4.2.24
+Version:        4.2.26
 Release:        0
 Summary:        YaST2 - Automated Installation
 License:        GPL-2.0-only

++++++ autoyast2-4.2.24.tar.bz2 -> autoyast2-4.2.26.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.24/package/autoyast2.changes 
new/autoyast2-4.2.26/package/autoyast2.changes
--- old/autoyast2-4.2.24/package/autoyast2.changes      2019-12-13 
18:56:19.000000000 +0100
+++ new/autoyast2-4.2.26/package/autoyast2.changes      2019-12-31 
13:23:29.000000000 +0100
@@ -1,4 +1,25 @@
 -------------------------------------------------------------------
+Tue Dec 31 11:43:56 UTC 2019 - Josef Reidinger <[email protected]>
+
+- Fix cloning patterns (regression from 4.2.22)
+  (bsc#1159269, bsc#1159472)
+- 4.2.26
+
+-------------------------------------------------------------------
+Tue Dec 17 16:19:57 UTC 2019 - Imobach Gonzalez Sosa <[email protected]>
+
+- Fixed conflicting items in rule dialogs (bsc#1123091).
+- Semi-automatic with partition: Do not use the common AY partition
+  workflow (bsc#1134501).
+- Do not reset Base-Product while registration. Do not call
+  registration in the second installation stage again.
+  (bsc#1143106).
+- Fix profile validation for scripts elements (bsc#1156905).
+- UI: Report XML parsing errors instead of just crashing
+  (bsc#1159157).
+- 4.2.25
+
+-------------------------------------------------------------------
 Fri Dec 13 14:26:11 UTC 2019 - Josef Reidinger <[email protected]>
 
 - Allow to run autoupgrade on registered system with almost empty
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.24/package/autoyast2.spec 
new/autoyast2-4.2.26/package/autoyast2.spec
--- old/autoyast2-4.2.24/package/autoyast2.spec 2019-12-13 18:56:19.000000000 
+0100
+++ new/autoyast2-4.2.26/package/autoyast2.spec 2019-12-31 13:23:29.000000000 
+0100
@@ -22,7 +22,7 @@
 %endif
 
 Name:           autoyast2
-Version:        4.2.24
+Version:        4.2.26
 Release:        0
 Summary:        YaST2 - Automated Installation
 License:        GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.24/src/autoyast-rnc/scripts.rnc 
new/autoyast2-4.2.26/src/autoyast-rnc/scripts.rnc
--- old/autoyast2-4.2.24/src/autoyast-rnc/scripts.rnc   2019-12-13 
18:56:19.000000000 +0100
+++ new/autoyast2-4.2.26/src/autoyast-rnc/scripts.rnc   2019-12-31 
13:23:29.000000000 +0100
@@ -19,7 +19,7 @@
 post-scripts =
 element post-scripts {
     LIST,
-    autoinstall-post-script+
+    autoinstall-script+
 }
 pre-scripts =
 element pre-scripts {
@@ -46,20 +46,13 @@
   source? &
   debug? &
   feedback? &
-  element notification { text }?
-}
-
-autoinstall-post-script = element script {
-  filename? &
-  interpreter? & 
-  element location { text }? &
-  source? &
-  debug? &
-  feedback? &
+  feedback_type? &
+  param-list? &
   element notification { text }?
 }
 
 autoinstall-init-script = element script {
+  debug? &
   filename? &
   element location { text }? &
   source?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.24/src/clients/ayast_setup.rb 
new/autoyast2-4.2.26/src/clients/ayast_setup.rb
--- old/autoyast2-4.2.24/src/clients/ayast_setup.rb     2019-12-13 
18:56:19.000000000 +0100
+++ new/autoyast2-4.2.26/src/clients/ayast_setup.rb     2019-12-31 
13:23:29.000000000 +0100
@@ -24,6 +24,7 @@
   class AyastSetupClient < Client
     include Yast::Logger
     include Y2Autoinstall::Clients::AyastSetup
+
     def main
       textdomain "autoinst"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.24/src/modules/AutoinstSoftware.rb 
new/autoyast2-4.2.26/src/modules/AutoinstSoftware.rb
--- old/autoyast2-4.2.24/src/modules/AutoinstSoftware.rb        2019-12-13 
18:56:19.000000000 +0100
+++ new/autoyast2-4.2.26/src/modules/AutoinstSoftware.rb        2019-12-31 
13:23:29.000000000 +0100
@@ -45,6 +45,7 @@
       Yast.import "PackageSystem"
       Yast.import "ProductFeatures"
       Yast.import "WorkflowManager"
+      Yast.import "Product"
 
       Yast.include self, "autoinstall/io.rb"
 
@@ -840,11 +841,16 @@
       ok = true
 
       Packages.Init(true)
+      selected_base_products = Product.FindBaseProducts.map { |p| p["name"] }
       # Resetting package selection of previous runs. This is needed
       # because it could be that additional repositories
       # are available meanwhile. (bnc#979691)
       Pkg.PkgApplReset
 
+      # Select base product again which has been reset by the previous call.
+      # (bsc#1143106)
+      selected_base_products.each { |name| Pkg.ResolvableInstall(name, 
:product) }
+
       sw_settings = Profile.current.fetch("software", {})
       Pkg.SetSolverFlags(
         "ignoreAlreadyRecommended" => Mode.normal,
@@ -1019,20 +1025,22 @@
       Pkg.SourceStartManager(true)
       Pkg.PkgSolve(false)
 
-      @all_xpatterns = Y2Packager::Resolvable.find(kind: :pattern)
+      @all_xpatterns = Y2Packager::Resolvable.find(
+        { kind: :pattern, status: :installed },
+        [:dependencies]
+      )
       to_install_packages = install_packages
       patterns = []
 
       @all_xpatterns.each do |p|
-        if p.status == :installed &&
-            !patterns.include?(p.name)
-          (patterns << p.name.empty?) ? "no name" : p.name
+        if !patterns.include?(p.name)
+          patterns << (p.name.empty? ? "no name" : p.name)
         end
       end
       Pkg.TargetFinish
 
       tmproot = AutoinstConfig.tmpDir
-      SCR.Execute(path(".target.mkdir"), Ops.add(tmproot, "/rootclone"))
+      SCR.Execute(path(".target.mkdir"), ::File.join(tmproot, "rootclone"))
       Pkg.TargetInit(Ops.add(tmproot, "/rootclone"), true)
       Builtins.y2debug("SourceStartCache: %1", Pkg.SourceStartCache(false))
 
@@ -1041,38 +1049,36 @@
 
       new_p = []
       Builtins.foreach(patterns) do |tmp_pattern|
-        xpattern = Builtins.filter(@all_xpatterns) do |p|
-          p.name == tmp_pattern
-        end
-        found = Ops.get(xpattern, 0, {})
+        found = @all_xpatterns.find { |p| p.name == tmp_pattern }
+        log.info "xpattern #{found} for pattern #{tmp_pattern}"
+        next unless found
+
         req = false
         # kick out hollow patterns (always fullfilled patterns)
-        Builtins.foreach(Ops.get_list(found, "dependencies", [])) do |d|
-          if Ops.get_string(d, "res_kind", "") == "package" &&
-              (Ops.get_string(d, "dep_kind", "") == "requires" ||
-                Ops.get_string(d, "dep_kind", "") == "recommends")
-            req = true
-          end
+        (found.dependencies || []).each do |d|
+          next unless Ops.get_string(d, "res_kind", "") == "package" &&
+            (Ops.get_string(d, "dep_kind", "") == "requires" ||
+              Ops.get_string(d, "dep_kind", "") == "recommends")
+
+          req = true
         end
         # workaround for our pattern design
         # a pattern with no requires at all is always fullfilled of course
         # you can fullfill the games pattern with no games installed at all
-        new_p = Builtins.add(new_p, tmp_pattern) if req == true
+        new_p << tmp_pattern if req
       end
-      patterns = deep_copy(new_p)
-
-      software = {}
-
-      Ops.set(software, "patterns", Builtins.sort(patterns))
-      # Currently we do not have any information about user deleted packages in
-      # the installed system.
-      # In order to prevent a reinstallation we can take the locked packages 
at least.
-      # (bnc#888296)
-      software["remove-packages"] = locked_packages
-
-      software["packages"] = to_install_packages
+      patterns = new_p
+      log.info "found patterns #{patterns}"
 
-      deep_copy(software)
+      {
+        "patterns"        => patterns.sort,
+        # Currently we do not have any information about user deleted packages 
in
+        # the installed system.
+        # In order to prevent a reinstallation we can take the locked packages 
at least.
+        # (bnc#888296)
+        "remove-packages" => locked_packages,
+        "packages"        => to_install_packages
+      }
     end
 
     # Return list of software packages, patterns which have been selected
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.24/test/fixtures/profiles/invalid.xml 
new/autoyast2-4.2.26/test/fixtures/profiles/invalid.xml
--- old/autoyast2-4.2.24/test/fixtures/profiles/invalid.xml     1970-01-01 
01:00:00.000000000 +0100
+++ new/autoyast2-4.2.26/test/fixtures/profiles/invalid.xml     2019-12-31 
13:23:29.000000000 +0100
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE profile>
+<profile xmlns="http://www.suse.com/1.0/yast2ns"; 
xmlns:config="http://www.suse.com/1.0/configns";>
+  <general>
+</profile>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/autoyast2-4.2.24/test/fixtures/profiles/minimal.xml.asc 
new/autoyast2-4.2.26/test/fixtures/profiles/minimal.xml.asc
--- old/autoyast2-4.2.24/test/fixtures/profiles/minimal.xml.asc 1970-01-01 
01:00:00.000000000 +0100
+++ new/autoyast2-4.2.26/test/fixtures/profiles/minimal.xml.asc 2019-12-31 
13:23:29.000000000 +0100
@@ -0,0 +1,14 @@
+-----BEGIN PGP MESSAGE-----
+
+jA0EBwMC3pVu9bV/fs7u0sDfAVP9uQYu878YhSbdllHtB3N9qf2peEdurg/u2ZMe
+0Ns33iur6spH6WSapExX6I9pDw+ms07dwGWe55XF9crjbdfY1wKbP4+tVoQbrmAG
+qmr6QWfKsYdxQ5d2YPn82phEPdwppXxSVHauIEr4+7eAHzsGUhZD4HV5DUiCr7UO
+mAJcBKiP4Z8z/k6fOJ2FeIc5dUFzaZzc2FcY6TvyxFwAD0pd/EfHRGgb/YVZYuIR
+wP/XS1NIt/q67G16k3BogdTT3dR5iNVekcHaou8TXw2X/Hd9F/TVlPXNUekuqc44
+lqd2CpQNRGwQy7b37vxL/asWBrPYM+k0JdI/oprCAJLRgYCAoM2KjCHB+80CZ8bt
+q8u0YjsEwEX2QQBw2E40H4LO/6JehTvRe2DAv5FzzuKUTUD3HsV1WgisA4XOZsO4
+OkbhaMNefnMFPZB8mJvdtCWKjpwIGAaJWS+xio6/kIzjXAQSeJH8C1+5izTTgtuc
+3S3iJ2NkyrGhEDxqeDfuJf5Vxz0YPRe/viZSkLQN2fvRR31uK0s34/yE150kbkB2
+ew==
+=0XLd
+-----END PGP MESSAGE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.24/test/lib/autosetup_helpers_test.rb 
new/autoyast2-4.2.26/test/lib/autosetup_helpers_test.rb
--- old/autoyast2-4.2.24/test/lib/autosetup_helpers_test.rb     2019-12-13 
18:56:19.000000000 +0100
+++ new/autoyast2-4.2.26/test/lib/autosetup_helpers_test.rb     2019-12-31 
13:23:29.000000000 +0100
@@ -87,6 +87,7 @@
           allow(Yast::WFM).to 
receive(:CallFunction).with("inst_download_release_notes")
             .and_return(true)
           allow(Yast::WFM).to receive(:CallFunction).with("scc_auto", 
anything).and_return(true)
+          Yast::Profile.Import(profile_content)
         end
 
         it "imports the registration settings from the profile" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.24/test/profile_test.rb 
new/autoyast2-4.2.26/test/profile_test.rb
--- old/autoyast2-4.2.24/test/profile_test.rb   2019-12-13 18:56:19.000000000 
+0100
+++ new/autoyast2-4.2.26/test/profile_test.rb   2019-12-31 13:23:29.000000000 
+0100
@@ -371,4 +371,80 @@
       end
     end
   end
+
+  describe "#ReadXML" do
+    let(:path) { File.join(FIXTURES_PATH, "profiles", xml_file) }
+
+    before do
+      subject.main
+    end
+
+    context "when the file is valid" do
+      let(:xml_file) { "partitions.xml" }
+
+      it "returns true" do
+        expect(subject.ReadXML(path)).to eq(true)
+      end
+
+      it "imports the file content" do
+        expect(subject).to receive(:Import).with(Hash)
+        subject.ReadXML(path)
+      end
+    end
+
+    context "when the file content is invalid" do
+      let(:xml_file) { "invalid.xml" }
+
+      before do
+        allow(Yast2::Popup).to receive(:show)
+      end
+
+      it "returns false" do
+        expect(subject.ReadXML(path)).to eq(false)
+      end
+
+      it "displays an error message" do
+        expect(Yast2::Popup).to receive(:show)
+        subject.ReadXML(path)
+      end
+
+      it "does not import the file content" do
+        expect(subject).to_not receive(:Import)
+        subject.ReadXML(path)
+      end
+    end
+
+    context "when the content is encrypted" do
+      let(:xml_file) { "profile.xml.asc" }
+
+      before do
+        allow(Yast::UI).to receive(:UserInput).and_return(:ok)
+        allow(Yast::UI).to receive(:QueryWidget).with(Id(:password), :Value)
+          .and_return("nots3cr3t")
+        allow(Yast::UI).to receive(:OpenDialog)
+      end
+
+      around do |example|
+        FileUtils.cp(File.join(FIXTURES_PATH, "profiles", "minimal.xml.asc"), 
path)
+        example.run
+        FileUtils.rm(path)
+      end
+
+      it "decrypts and imports the file content" do
+        expect(subject).to receive(:Import).with(Hash)
+        subject.ReadXML(path)
+      end
+
+      context "during the first stage" do
+        before do
+          allow(Yast::Stage).to receive(:initial).and_return(true)
+        end
+
+        it "saves the unencrypted content" do
+          subject.ReadXML(path)
+          expect(File.read(path)).to_not include("BEGIN PGP MESSAGE")
+        end
+      end
+    end
+  end
 end


Reply via email to