Hello community,

here is the log from the commit of package yast2-bootloader for 
openSUSE:Factory checked in at 2014-08-15 09:58:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-bootloader.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-bootloader"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes        
2014-08-11 10:09:47.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes   
2014-08-15 09:58:38.000000000 +0200
@@ -1,0 +2,14 @@
+Thu Aug 14 13:11:29 CEST 2014 - [email protected]
+
+- AutoYaST clone_system: Not using "next" in a ruby "reduce" call.
+  (bnc#891079)
+- 3.1.87
+
+-------------------------------------------------------------------
+Tue Aug 12 13:46:17 UTC 2014 - [email protected]
+
+- Fixed adding a crashkernel parameter to xen_append if the latter
+  is missing. kdump.service would fail then (bnc#886843)
+- 3.1.86
+
+-------------------------------------------------------------------

Old:
----
  yast2-bootloader-3.1.85.tar.bz2

New:
----
  yast2-bootloader-3.1.87.tar.bz2

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

Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.YR3AE7/_old  2014-08-15 09:58:40.000000000 +0200
+++ /var/tmp/diff_new_pack.YR3AE7/_new  2014-08-15 09:58:40.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        3.1.85
+Version:        3.1.87
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -28,6 +28,7 @@
 BuildRequires:  update-desktop-files
 BuildRequires:  yast2 >= 3.1.0
 BuildRequires:  yast2-devtools >= 3.1.10
+BuildRequires:  yast2-storage
 PreReq:         /bin/sed %fillup_prereq
 # Installation::*version variables
 # Wizard::SetDialogTitleAndIcon

++++++ yast2-bootloader-3.1.85.tar.bz2 -> yast2-bootloader-3.1.87.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.1.85/.yardopts 
new/yast2-bootloader-3.1.87/.yardopts
--- old/yast2-bootloader-3.1.85/.yardopts       2014-08-08 16:12:44.000000000 
+0200
+++ new/yast2-bootloader-3.1.87/.yardopts       2014-08-14 13:33:10.000000000 
+0200
@@ -1 +1,7 @@
---no-private --markup markdown --protected src/**/*.rb --readme README.md 
--output-dir ./doc/autodocs
+--no-private
+--markup markdown
+--protected
+--readme README.md
+--output-dir ./doc/autodocs
+--files *.md
+src/**/*.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.1.85/SUPPORTED_SCENARIOS.md 
new/yast2-bootloader-3.1.87/SUPPORTED_SCENARIOS.md
--- old/yast2-bootloader-3.1.85/SUPPORTED_SCENARIOS.md  1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-bootloader-3.1.87/SUPPORTED_SCENARIOS.md  2014-08-14 
13:33:10.000000000 +0200
@@ -0,0 +1,58 @@
+# Supported Scenarios
+
+The goal of this document is to have a single source of information  which 
scenarios are supported by yast2-bootloader.
+
+## bootloaders
+
+* grub2
+* grub2-efi
+  * only for UEFI boot
+  * only with GPT (see 
[bug](https://bugzilla.novell.com/show_bug.cgi?id=889733#c8))
+* none
+* grub
+  * for openSUSE only, not proposed by default, likely to be removed
+  * only for x86 hardware
+
+# Partition table
+
+* [DOS partition table](http://en.wikipedia.org/wiki/Master_boot_record)
+* [GPT](http://en.wikipedia.org/wiki/GUID_Partition_Table)
+  * requires [bios_boot 
partition](http://en.wikipedia.org/wiki/BIOS_Boot_partition) if stage1 will be 
on disk
+  * /boot must be on partition 1..4
+* [DASD](http://en.wikipedia.org/wiki/Direct-access_storage_device)
+  * only s390x
+
+# storage configuration
+
+* software RAID
+  * /boot cannot be on RAID unless it is RAID1
+  * cannot have stage1 on MD RAID1 ( so no /boot on RAID1 )
+* LVM
+  * /boot cannot be encrypted (not bootloader limitation see 
[bug](https://bugzilla.novell.com/show_bug.cgi?id=890364#c40))
+* multipath
+* Device mapper
+* local hard disk (including USB/ieee1394)
+* local (hardware) RAID array of any type
+* BIOS-RAID (handled via DM-RAID or MD RAID)
+* iSCSI server with persistent IP address / disk identification
+* NFSv3,v4 share on server with fixed IP address
+
+
+# Architectures
+
+* x86
+* x86_64
+* ppc64(le and be)
+  * only GRUB2
+  * there must be at least one [PReP 
partition](http://en.wikipedia.org/wiki/Partition_type#List_of_partition_IDs) 
which size must not exceed 8MB (see [fate](https://fate.suse.com/317302))
+* s390x
+  * /boot/zipl must be on ext fs ( unless upgraded from working zipl 
configuration )
+  * only GRUB2
+
+# Stage1 locations
+
+* MBR of disk where is /boot
+* MBR of identical disks in MD RAID if it contains /boot 
[fate](https://fate.novell.com/316983)
+* /boot
+* extended partition
+  * /boot has to be on a logical partition
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.85/package/yast2-bootloader.changes 
new/yast2-bootloader-3.1.87/package/yast2-bootloader.changes
--- old/yast2-bootloader-3.1.85/package/yast2-bootloader.changes        
2014-08-08 16:12:44.000000000 +0200
+++ new/yast2-bootloader-3.1.87/package/yast2-bootloader.changes        
2014-08-14 13:33:10.000000000 +0200
@@ -1,4 +1,18 @@
 -------------------------------------------------------------------
+Thu Aug 14 13:11:29 CEST 2014 - [email protected]
+
+- AutoYaST clone_system: Not using "next" in a ruby "reduce" call.
+  (bnc#891079)
+- 3.1.87
+
+-------------------------------------------------------------------
+Tue Aug 12 13:46:17 UTC 2014 - [email protected]
+
+- Fixed adding a crashkernel parameter to xen_append if the latter
+  is missing. kdump.service would fail then (bnc#886843)
+- 3.1.86
+
+-------------------------------------------------------------------
 Fri Aug  8 13:55:23 UTC 2014 - [email protected]
 
 - do not crash in some condition in combination of LVM and GPT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.85/package/yast2-bootloader.spec 
new/yast2-bootloader-3.1.87/package/yast2-bootloader.spec
--- old/yast2-bootloader-3.1.85/package/yast2-bootloader.spec   2014-08-08 
16:12:44.000000000 +0200
+++ new/yast2-bootloader-3.1.87/package/yast2-bootloader.spec   2014-08-14 
13:33:10.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        3.1.85
+Version:        3.1.87
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -30,6 +30,7 @@
 BuildRequires: yast2 >= 3.1.0
 BuildRequires:  update-desktop-files
 BuildRequires:  rubygem-rspec
+BuildRequires:  yast2-storage
 PreReq:         /bin/sed %fillup_prereq
 # Installation::*version variables
 # Wizard::SetDialogTitleAndIcon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-3.1.85/src/include/bootloader/routines/misc.rb 
new/yast2-bootloader-3.1.87/src/include/bootloader/routines/misc.rb
--- old/yast2-bootloader-3.1.85/src/include/bootloader/routines/misc.rb 
2014-08-08 16:12:44.000000000 +0200
+++ new/yast2-bootloader-3.1.87/src/include/bootloader/routines/misc.rb 
2014-08-14 13:33:10.000000000 +0200
@@ -466,6 +466,10 @@
     end
 
 
+    def kernel_param_key(value)
+      value.split("=").first
+    end
+
     # set kernel parameter to GRUB command line
     # @param [String] line string original line
     # @param [String] key string parameter key
@@ -473,51 +477,43 @@
     #   "true" to add key without value
     # @return [String] new kernel command line
     def setKernelParamToLine(line, key, value)
+      line ||= ""
       # FIXME this doesn't work with quotes and spaces
-      params = Builtins.splitstring(line, " ")
-      params = Builtins.filter(params) { |p| p != "" }
-      done = false
-      # count occurences of every parameter
-      occurences = {}
-      Builtins.foreach(params) do |p|
-        l = Builtins.filter(Builtins.splitstring(p, "=")) do |e|
-          e != " " && e != ""
-        end
-        k = Ops.get(l, 0, "")
-        Ops.set(occurences, k, Ops.add(Ops.get(occurences, k, 0), 1))
+      params = line.split(" ").reject(&:empty?)
+      # count occurences of every parameter, initial value is 0
+      occurences = Hash.new { |k| 0 }
+      params.each do |param|
+        k = kernel_param_key(param)
+        occurences[k] += 1
       end
-      params = Builtins.maplist(params) do |p|
-        l = Builtins.filter(Builtins.splitstring(p, "=")) do |e|
-          e != " " && e != ""
-        end
-        k = Ops.get(l, 0, "")
-        if k == key
-          if value == "false"
-            next ""
-          elsif Ops.less_or_equal(Ops.get(occurences, k, 0), 1)
-            done = true
-            if value == "true"
-              next key
-            elsif value != "false"
-              next Builtins.sformat("%1=%2", key, value)
-            end
-          else
-            Ops.set(occurences, k, Ops.subtract(Ops.get(occurences, k, 0), 1))
-            next ""
+      done = false
+      params = params.reduce([]) do |res, param|
+        k = kernel_param_key(param)
+        if k != key # not our param
+          res << param
+        elsif value == "false"
+          # do nothing as we want to remove this param
+        elsif occurences[k] == 1 # last parameter with given key
+          done = true
+          if value == "true"
+            res << key
+          elsif value != "false"
+            res << Builtins.sformat("%1=%2", key, value)
           end
+        else
+          occurences[k] -= 1
+          res << param
         end
-        p
+        res
       end
       if !done
         if value == "true"
-          params = Builtins.add(params, key)
+          params << key
         elsif value != "false"
-          params = Builtins.add(params, Builtins.sformat("%1=%2", key, value))
+          params << Builtins.sformat("%1=%2", key, value)
         end
       end
-      params = Builtins.filter(params) { |p| p != "" }
-      line = Builtins.mergestring(params, " ")
-      line
+      params.join(" ")
     end
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.1.85/src/modules/BootStorage.rb 
new/yast2-bootloader-3.1.87/src/modules/BootStorage.rb
--- old/yast2-bootloader-3.1.85/src/modules/BootStorage.rb      2014-08-08 
16:12:44.000000000 +0200
+++ new/yast2-bootloader-3.1.87/src/modules/BootStorage.rb      2014-08-14 
13:33:10.000000000 +0200
@@ -1557,14 +1557,14 @@
       tm = Storage.GetTargetMap
       res = res.reduce([]) do |ret, disk|
         disk_meta = tm[disk]
-        next unless disk_meta
-
-        if disk_meta["lvm2"]
-          devices = (disk_meta["devices"] || []) + (disk_meta["devices_add"] 
|| [])
-          disks = devices.map { |d| real_disks_for_partition(d) }
-          ret.concat(disks.flatten)
-        else
-          ret << disk
+        if disk_meta
+          if disk_meta["lvm2"]
+            devices = (disk_meta["devices"] || []) + (disk_meta["devices_add"] 
|| [])
+            disks = devices.map { |d| real_disks_for_partition(d) }
+            ret.concat(disks.flatten)
+          else
+            ret << disk
+          end
         end
         ret
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.1.85/test/Makefile.am 
new/yast2-bootloader-3.1.87/test/Makefile.am
--- old/yast2-bootloader-3.1.85/test/Makefile.am        2014-08-08 
16:12:44.000000000 +0200
+++ new/yast2-bootloader-3.1.87/test/Makefile.am        2014-08-14 
13:33:10.000000000 +0200
@@ -1,4 +1,6 @@
 TESTS = \
+  boot_common_test.rb \
+  boot_storage_test.rb \
   grub2pwd_test.rb
 
 TEST_EXTENSIONS = .rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-3.1.85/test/boot_common_test.rb 
new/yast2-bootloader-3.1.87/test/boot_common_test.rb
--- old/yast2-bootloader-3.1.85/test/boot_common_test.rb        1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-bootloader-3.1.87/test/boot_common_test.rb        2014-08-14 
13:33:10.000000000 +0200
@@ -0,0 +1,75 @@
+require_relative "test_helper"
+
+Yast.import "BootCommon"
+
+describe Yast::BootCommon do
+  describe ".setKernelParamToLine" do
+    def expect_set(key: nil, val: nil, old: nil, new: nil)
+      expect(Yast::BootCommon.setKernelParamToLine(old, key, val)).
+        to eq new
+    end
+
+    it "return line with added key=value if there is not yet such key on line" 
do
+      expect_set(key: "vga",
+                 val: "800",
+                 old: "quit silent=1",
+                 new: "quit silent=1 vga=800")
+    end
+
+    it "return line with modified kernel parameter to given value if line 
contain key" do
+      expect_set(key: "vga",
+                 val: "800",
+                 old: "quit silent=1 vga=753",
+                 new: "quit silent=1 vga=800")
+    end
+
+    it "return line with added parameter to kernel parameter line if value is 
\"true\"" do
+      expect_set(key: "verbose",
+                 val: "true",
+                 old: "quit silent=1 vga=753",
+                 new: "quit silent=1 vga=753 verbose")
+    end
+
+    it "return same line if parameter is already on parameter line when value 
is \"true\"" do
+      expect_set(key: "quit",
+                 val: "true",
+                 old: "quit silent=1 vga=753",
+                 new: "quit silent=1 vga=753")
+    end
+
+    it "return line with removed parameter from line if value is \"false\"" do
+      expect_set(key: "quit",
+                 val: "false",
+                 old: "quit silent=1 vga=753",
+                 new: "silent=1 vga=753")
+    end
+
+    it "return same line if parameter is already missing on line when value is 
\"false\"" do
+      expect_set(key: "verbose",
+                 val: "false",
+                 old: "quit silent=1 vga=753",
+                 new: "quit silent=1 vga=753")
+    end
+
+    it "return line with key=value if line is nil" do
+      expect_set(key: "silent",
+                 val: "1",
+                 old: nil,
+                 new: "silent=1")
+    end
+
+    it "return line with key when value is \"true\" and line is nil" do
+      expect_set(key: "verbose",
+                 val: "true",
+                 old: nil,
+                 new: "verbose")
+    end
+
+    it "return empty string when value is \"false\" and line is nil" do
+      expect_set(key: "verbose",
+                 val: "false",
+                 old: nil,
+                 new: "")
+    end
+  end
+end

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

Reply via email to