Hello community,

here is the log from the commit of package yast2-packager for openSUSE:Factory 
checked in at 2014-07-31 21:49:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-packager.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-packager"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes    
2014-07-30 07:35:03.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes       
2014-07-31 21:49:22.000000000 +0200
@@ -1,0 +2,21 @@
+Thu Jul 31 14:43:16 CEST 2014 - [email protected]
+
+- Added user confirmation for aborting the repositories dialogs
+  (bnc#886662)
+- 3.1.38
+
+-------------------------------------------------------------------
+Thu Jul 31 11:18:09 UTC 2014 - [email protected]
+
+- added product rename sle-hae -> sle-ha to the list (bnc#889745)
+- 3.1.37
+
+-------------------------------------------------------------------
+Wed Jul 30 06:57:47 UTC 2014 - [email protected]
+
+- Refactored kernelCmdLinePackages to rely on .proc.cmdline agent
+  (bnc#889365)
+- Added dependency on yast2 >= 3.1.89 (fixed agent)
+- 3.1.36
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.1ouL9S/_old  2014-07-31 21:49:23.000000000 +0200
+++ /var/tmp/diff_new_pack.1ouL9S/_new  2014-07-31 21:49:23.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.1.35
+Version:        3.1.38
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -43,8 +43,8 @@
 # Pkg::SetZConfig()
 Requires:       yast2-pkg-bindings >= 2.21.8
 
-# HwDetection
-Requires:       yast2 >= 3.1.19
+# Fixed .proc.cmdline agent
+Requires:       yast2 >= 3.1.89
 
 # unzipping license file
 Requires:       unzip

++++++ yast2-packager-3.1.35.tar.bz2 -> yast2-packager-3.1.38.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.35/package/yast2-packager.changes 
new/yast2-packager-3.1.38/package/yast2-packager.changes
--- old/yast2-packager-3.1.35/package/yast2-packager.changes    2014-07-29 
18:09:45.000000000 +0200
+++ new/yast2-packager-3.1.38/package/yast2-packager.changes    2014-07-31 
15:44:43.000000000 +0200
@@ -1,4 +1,25 @@
 -------------------------------------------------------------------
+Thu Jul 31 14:43:16 CEST 2014 - [email protected]
+
+- Added user confirmation for aborting the repositories dialogs
+  (bnc#886662)
+- 3.1.38
+
+-------------------------------------------------------------------
+Thu Jul 31 11:18:09 UTC 2014 - [email protected]
+
+- added product rename sle-hae -> sle-ha to the list (bnc#889745)
+- 3.1.37
+
+-------------------------------------------------------------------
+Wed Jul 30 06:57:47 UTC 2014 - [email protected]
+
+- Refactored kernelCmdLinePackages to rely on .proc.cmdline agent
+  (bnc#889365)
+- Added dependency on yast2 >= 3.1.89 (fixed agent)
+- 3.1.36
+
+-------------------------------------------------------------------
 Tue Jul 29 15:52:43 UTC 2014 - [email protected]
 
 - ag_zypp_repos - do not try parsing directory entries in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.35/package/yast2-packager.spec 
new/yast2-packager-3.1.38/package/yast2-packager.spec
--- old/yast2-packager-3.1.35/package/yast2-packager.spec       2014-07-29 
18:09:45.000000000 +0200
+++ new/yast2-packager-3.1.38/package/yast2-packager.spec       2014-07-31 
15:44:43.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.1.35
+Version:        3.1.38
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -42,8 +42,8 @@
 # Pkg::SetZConfig()
 Requires:      yast2-pkg-bindings >= 2.21.8
 
-# HwDetection
-Requires: yast2 >= 3.1.19
+# Fixed .proc.cmdline agent
+Requires: yast2 >= 3.1.89
 
 # unzipping license file
 Requires:      unzip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.35/src/modules/AddOnProduct.rb 
new/yast2-packager-3.1.38/src/modules/AddOnProduct.rb
--- old/yast2-packager-3.1.35/src/modules/AddOnProduct.rb       2014-07-29 
18:09:45.000000000 +0200
+++ new/yast2-packager-3.1.38/src/modules/AddOnProduct.rb       2014-07-31 
15:44:44.000000000 +0200
@@ -136,7 +136,8 @@
         "SUSE_SLES"  => [ "SLES" ],
         # SLED or Workstation extension
         "SUSE_SLED"  => [ "SLED", "sle-we" ],
-        "sle-haegeo" => [ "sle-ha-geo" ]
+        "sle-haegeo" => [ "sle-ha-geo" ],
+        "sle-hae"    => [ "sle-ha" ]
       }
 
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.35/src/modules/Packages.rb 
new/yast2-packager-3.1.38/src/modules/Packages.rb
--- old/yast2-packager-3.1.35/src/modules/Packages.rb   2014-07-29 
18:09:45.000000000 +0200
+++ new/yast2-packager-3.1.38/src/modules/Packages.rb   2014-07-31 
15:44:44.000000000 +0200
@@ -970,24 +970,25 @@
       ret = []
 
       add_biosdevname = false
-      cmdline = Convert.to_string(
-        SCR.Read(path(".target.string"), "/proc/cmdline")
-      )
-
-      options = cmdline.split(/\s/)
+      options = SCR.Read(path(".proc.cmdline"))
+      option = options.grep(/^biosdevname=/i).first
+      if option
+        value = option[/^biosdevname=(\d+)/i, 1]
+      else #missing biosdevname option
+        value = nil
+      end
 
-      if Builtins.contains(options, "biosdevname=1")
+      if value == "1"
         Builtins.y2milestone("Biosdevname explicitly enabled")
         add_biosdevname = true
-      elsif Builtins.contains(options, "biosdevname=0")
+      elsif value == "0"
         Builtins.y2milestone("Biosdevname explicitly disabled")
         add_biosdevname = false
       else
         Builtins.y2milestone("Missing biosdevname option, autodetecting...")
         add_biosdevname = true if DellSystem()
       end
-
-      ret = Builtins.add(ret, "biosdevname") if add_biosdevname
+      ret << "biosdevname" if add_biosdevname
 
       Builtins.y2milestone("Packages added by kernel command line: %1", ret)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.35/src/modules/SourceDialogs.rb 
new/yast2-packager-3.1.38/src/modules/SourceDialogs.rb
--- old/yast2-packager-3.1.35/src/modules/SourceDialogs.rb      2014-07-29 
18:09:45.000000000 +0200
+++ new/yast2-packager-3.1.38/src/modules/SourceDialogs.rb      2014-07-31 
15:44:44.000000000 +0200
@@ -77,6 +77,7 @@
       Yast.import "IP"
       Yast.import "ProductControl"
       Yast.import "ProductFeatures"
+      Yast.import "Stage"
 
       # common functions / data
 
@@ -112,6 +113,11 @@
         "<p>If the repository is on multiple media,\nset the location of the 
first media of the set.</p>\n"
       )
 
+      # Belongs to a constant, but can't be there because of `fun_ref`
+      @default_cwm_fallback_functions = {
+        :abort => fun_ref(method(:confirm_abort?), "boolean ()")
+      }
+
       # NFS editation widget
 
       @nfs_details_content = VBox(
@@ -1956,6 +1962,7 @@
       @display_addon_checkbox ? HSpacing(3) : Empty()
     end
 
+    # FIXME: two almost same definitions in the same function smell bad
     def SelectRadioWidgetOpt(download_widget)
       contents = HBox(
         HStretch(),
@@ -2142,25 +2149,27 @@
       true
     end
 
+    # Handles Ui events in New repository type selection dialog
+    #
+    # @param [String] widget key
+    # @param [Hash] event description
+    # @return [Symbol]
     def SelectHandle(key, event)
-      event = deep_copy(event)
-      # reset the preselected URL when going back
-      @_url = "" if Ops.get(event, "ID") == :back
-
-      if !(Ops.get(event, "ID") == :next || Ops.get(event, "ID") == :ok)
-        RefreshTypeWidgets() if event["ID"] == :add_addon
+      case event["ID"]
+      when :back
+        # reset the preselected URL when going back
+        @_url = ""
+      when :next, :ok
+        return nil
+      when :add_addon
+        RefreshTypeWidgets()
         return nil
       end
 
-      selected = Convert.to_symbol(UI.QueryWidget(Id(:type), :CurrentButton))
-
       #  TODO: disable "download" option when CD or DVD source is selected
 
-      return nil if selected == nil
-      if selected == :slp || selected == :cd || selected == :dvd ||
-          selected == :comm_repos
-        return :finish
-      end
+      selected = UI.QueryWidget(Id(:type), :CurrentButton)
+      return :finish if [:slp, :cd, :dvd, :comm_repos].include?(selected)
 
       nil
     end
@@ -2494,7 +2503,7 @@
           "caption"            => caption,
           "back_button"        => Label.BackButton,
           "next_button"        => Label.NextButton,
-          "fallback_functions" => {}
+          "fallback_functions" => @default_cwm_fallback_functions,
         }
       )
     end
@@ -2515,7 +2524,7 @@
           "caption"            => caption,
           "back_button"        => Label.BackButton,
           "next_button"        => Label.NextButton,
-          "fallback_functions" => {}
+          "fallback_functions" => @default_cwm_fallback_functions,
         }
       )
     end
@@ -2558,7 +2567,7 @@
           "caption"            => caption,
           "back_button"        => Label.BackButton,
           "next_button"        => Label.NextButton,
-          "fallback_functions" => {}
+          "fallback_functions" => @default_cwm_fallback_functions,
         }
       )
       Builtins.y2milestone("Type dialog returned %1", ret)
@@ -2582,7 +2591,7 @@
           "caption"            => caption,
           "back_button"        => Label.BackButton,
           "next_button"        => Label.NextButton,
-          "fallback_functions" => {}
+          "fallback_functions" => @default_cwm_fallback_functions,
         }
       )
 
@@ -2592,6 +2601,13 @@
       deep_copy(ret)
     end
 
+    # Returns boolean whether user confirmed to abort the configuration
+    #
+    # @return [Boolean] whether to abort
+    def confirm_abort?
+      (Stage.initial ? Popup.ConfirmAbort(:painless) : 
Popup.ReallyAbort(SourceManager.Modified()))
+    end
+
     publish :function => :SetURL, :type => "void (string)"
     publish :function => :SetURLType, :type => "void (string, boolean)"
     publish :function => :GetURL, :type => "string ()"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-3.1.35/test/data/cmdline-biosdevname_0/proc/cmdline 
new/yast2-packager-3.1.38/test/data/cmdline-biosdevname_0/proc/cmdline
--- old/yast2-packager-3.1.35/test/data/cmdline-biosdevname_0/proc/cmdline      
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-packager-3.1.38/test/data/cmdline-biosdevname_0/proc/cmdline      
2014-07-31 15:44:44.000000000 +0200
@@ -0,0 +1,2 @@
+install=cd:// vga=0x314 biosdevname=0
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-3.1.35/test/data/cmdline-biosdevname_1/proc/cmdline 
new/yast2-packager-3.1.38/test/data/cmdline-biosdevname_1/proc/cmdline
--- old/yast2-packager-3.1.35/test/data/cmdline-biosdevname_1/proc/cmdline      
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-packager-3.1.38/test/data/cmdline-biosdevname_1/proc/cmdline      
2014-07-31 15:44:44.000000000 +0200
@@ -0,0 +1 @@
+install=cd:// vga=0x314 biosDevName=1 anotheroption
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-3.1.35/test/data/cmdline-biosdevname_10/proc/cmdline 
new/yast2-packager-3.1.38/test/data/cmdline-biosdevname_10/proc/cmdline
--- old/yast2-packager-3.1.35/test/data/cmdline-biosdevname_10/proc/cmdline     
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-packager-3.1.38/test/data/cmdline-biosdevname_10/proc/cmdline     
2014-07-31 15:44:44.000000000 +0200
@@ -0,0 +1 @@
+install=cd:// vga=0x314 biosDevName=10 anotheroption
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-3.1.35/test/data/cmdline-biosdevname_nil/proc/cmdline 
new/yast2-packager-3.1.38/test/data/cmdline-biosdevname_nil/proc/cmdline
--- old/yast2-packager-3.1.35/test/data/cmdline-biosdevname_nil/proc/cmdline    
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-packager-3.1.38/test/data/cmdline-biosdevname_nil/proc/cmdline    
2014-07-31 15:44:44.000000000 +0200
@@ -0,0 +1 @@
+install=cd:// vga=0x314
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.35/test/packages_test.rb 
new/yast2-packager-3.1.38/test/packages_test.rb
--- old/yast2-packager-3.1.35/test/packages_test.rb     2014-07-29 
18:09:45.000000000 +0200
+++ new/yast2-packager-3.1.38/test/packages_test.rb     2014-07-31 
15:44:44.000000000 +0200
@@ -28,6 +28,13 @@
   YAML.load_file(file_name)
 end
 
+def set_root_path(directory)
+  root = File.join(DATA_PATH, directory)
+  check_version = false
+  handle = Yast::WFM.SCROpen("chroot=#{root}:scr", check_version)
+  Yast::WFM.SCRSetDefault(handle)
+end
+
 PRODUCTS_FROM_ZYPP = load_zypp('products.yml').freeze
 
 describe Yast::Packages do
@@ -38,40 +45,37 @@
   describe "#kernelCmdLinePackages" do
     before(:each) do
       # default value
-      Yast::SCR.stub(:Read).and_return(nil)
       Yast::Product.stub(:Product).and_return(nil)
     end
 
+    after(:each) do
+      # set_root_path is always called and it opens a SCR instance
+      # that needs to be closed
+      Yast::WFM.SCRClose(Yast::WFM.SCRGetDefault)
+    end
+
     context "when biosdevname behavior explicitly defined on the Kenel command 
line" do
       it "returns biosdevname within the list of required packages" do
-        Yast::SCR.stub(:Read).with(
-          SCR_STRING_PATH,"/proc/cmdline"
-        ).and_return("install=cd:// vga=0x314 biosdevname=1")
+        set_root_path("cmdline-biosdevname_1")
         
expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to be_true
       end
 
-      it "returns biosdevname within the list of required packages with new 
line at the end" do
-        Yast::SCR.stub(:Read).with(
-          SCR_STRING_PATH,"/proc/cmdline"
-        ).and_return("install=cd:// vga=0x314\nbiosdevname=1\n")
-        
expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to be_true
+      it "does not return biosdevname within the list of required packages" do
+        set_root_path("cmdline-biosdevname_0")
+        
expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to be_false
       end
 
-      it "does not return biosdevname within the list of required packages" do
-        Yast::SCR.stub(:Read).with(
-          SCR_STRING_PATH,"/proc/cmdline"
-        ).and_return("install=cd:// vga=0x314 biosdevname=0")
+      it "does not return biosdevname within the list of required packages 
then value is invalid" do
+        set_root_path("cmdline-biosdevname_10")
         
expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to be_false
       end
     end
 
     context "when biosdevname behavior not defined on the Kernel command line" 
do
+      before { set_root_path("cmdline-biosdevname_nil") }
+
       context "and running on a Dell system" do
         it "returns biosdevname within the list of packages" do
-          Yast::SCR.stub(:Read).with(
-            Yast::Path.new(".target.string"),
-            "/proc/cmdline"
-          ).and_return("install=cd:// vga=0x314")
           # 0 means `grep` succeeded
           Yast::SCR.stub(:Execute).with(SCR_BASH_PATH, 
CHECK_FOR_DELL_SYSTEM).and_return(0)
           
expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to be_true
@@ -80,10 +84,6 @@
 
       context "and running on a non-Dell system" do
         it "does not return biosdevname within the list of packages" do
-          Yast::SCR.stub(:Read).with(
-            Yast::Path.new(".target.string"),
-            "/proc/cmdline"
-          ).and_return("install=cd:// vga=0x314")
           # 1 means `grep` has not succeeded
           Yast::SCR.stub(:Execute).with(SCR_BASH_PATH, 
CHECK_FOR_DELL_SYSTEM).and_return(1)
           
expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to be_false

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

Reply via email to