Hello community,

here is the log from the commit of package yast2-packager for openSUSE:Factory 
checked in at 2020-09-24 16:12:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-packager.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-packager"

Thu Sep 24 16:12:32 2020 rev:402 rq:835771 version:4.3.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes    
2020-09-18 14:35:48.687703061 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new.4249/yast2-packager.changes  
2020-09-24 16:13:08.620832585 +0200
@@ -1,0 +2,7 @@
+Mon Sep 21 08:30:04 UTC 2020 - Ladislav Slezák <[email protected]>
+
+- Fixed WFM.Args call to not produce an error message in the y2log
+  (bsc#1176653)
+- 4.3.8
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.Q5hTgd/_old  2020-09-24 16:13:09.408833373 +0200
+++ /var/tmp/diff_new_pack.Q5hTgd/_new  2020-09-24 16:13:09.412833378 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        4.3.7
+Version:        4.3.8
 Release:        0
 Summary:        YaST2 - Package Library
 License:        GPL-2.0-or-later

++++++ yast2-packager-4.3.7.tar.bz2 -> yast2-packager-4.3.8.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-4.3.7/package/yast2-packager.changes 
new/yast2-packager-4.3.8/package/yast2-packager.changes
--- old/yast2-packager-4.3.7/package/yast2-packager.changes     2020-09-16 
15:38:48.000000000 +0200
+++ new/yast2-packager-4.3.8/package/yast2-packager.changes     2020-09-21 
11:07:35.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Mon Sep 21 08:30:04 UTC 2020 - Ladislav Slezák <[email protected]>
+
+- Fixed WFM.Args call to not produce an error message in the y2log
+  (bsc#1176653)
+- 4.3.8
+
+-------------------------------------------------------------------
 Wed Sep 16 12:17:07 UTC 2020 - Ladislav Slezák <[email protected]>
 
 - Fixed name of the add-on repository (bsc#1175374, related
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-4.3.7/package/yast2-packager.spec 
new/yast2-packager-4.3.8/package/yast2-packager.spec
--- old/yast2-packager-4.3.7/package/yast2-packager.spec        2020-09-16 
15:38:48.000000000 +0200
+++ new/yast2-packager-4.3.8/package/yast2-packager.spec        2020-09-21 
11:07:35.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        4.3.7
+Version:        4.3.8
 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.3.7/src/lib/y2packager/medium_type.rb 
new/yast2-packager-4.3.8/src/lib/y2packager/medium_type.rb
--- old/yast2-packager-4.3.7/src/lib/y2packager/medium_type.rb  2020-09-16 
15:38:48.000000000 +0200
+++ new/yast2-packager-4.3.8/src/lib/y2packager/medium_type.rb  2020-09-21 
11:07:35.000000000 +0200
@@ -80,6 +80,8 @@
       # @return [Boolean] True if the client should be skipped.
       #
       def skip_step?
+        return false if Yast::WFM.Args.empty?
+
         skip = Yast::WFM.Args(0) && Yast::WFM.Args(0)["skip"]
         return true if skip&.split(",")&.include?(type.to_s)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-4.3.7/test/medium_type_test.rb 
new/yast2-packager-4.3.8/test/medium_type_test.rb
--- old/yast2-packager-4.3.7/test/medium_type_test.rb   2020-09-16 
15:38:48.000000000 +0200
+++ new/yast2-packager-4.3.8/test/medium_type_test.rb   2020-09-21 
11:07:35.000000000 +0200
@@ -92,6 +92,11 @@
     end
   end
 
+  def mock_arguments(arg)
+    allow(Yast::WFM).to receive(:Args).and_return([arg])
+    allow(Yast::WFM).to receive(:Args).with(0).and_return(arg)
+  end
+
   describe "#skip_step?" do
     context "online installation medium" do
       before do
@@ -99,27 +104,31 @@
       end
 
       it "returns true if the client args contain \"skip\" => \"online\"" do
-        allow(Yast::WFM).to receive(:Args).with(0).and_return("skip" => 
"online")
+        mock_arguments("skip" => "online")
         expect(Y2Packager::MediumType.skip_step?).to eq(true)
       end
       it "returns true if the client args contain \"skip\" => 
\"standard,online\"" do
-        allow(Yast::WFM).to receive(:Args).with(0).and_return("skip" => 
"standard,online")
+        mock_arguments("skip" => "standard,online")
         expect(Y2Packager::MediumType.skip_step?).to eq(true)
       end
       it "returns false if the client args do not contain \"skip\" => 
\"online\"" do
-        allow(Yast::WFM).to receive(:Args).with(0).and_return({})
+        mock_arguments({})
         expect(Y2Packager::MediumType.skip_step?).to eq(false)
       end
       it "returns false if the client args contain \"only\" => \"online\"" do
-        allow(Yast::WFM).to receive(:Args).with(0).and_return("only" => 
"online")
+        mock_arguments("only" => "online")
         expect(Y2Packager::MediumType.skip_step?).to eq(false)
       end
       it "returns false if the client args contain \"only\" => 
\"online,standard\"" do
-        allow(Yast::WFM).to receive(:Args).with(0).and_return("only" => 
"standard,online")
+        mock_arguments("only" => "standard,online")
         expect(Y2Packager::MediumType.skip_step?).to eq(false)
       end
       it "returns false if the client args do not contain \"only\" => 
\"online\"" do
-        allow(Yast::WFM).to receive(:Args).with(0).and_return({})
+        mock_arguments({})
+        expect(Y2Packager::MediumType.skip_step?).to eq(false)
+      end
+      it "returns false if the client args are empty" do
+        allow(Yast::WFM).to receive(:Args).and_return([])
         expect(Y2Packager::MediumType.skip_step?).to eq(false)
       end
     end


Reply via email to