Hello community,

here is the log from the commit of package yast2-storage for openSUSE:Factory 
checked in at 2013-09-29 17:55:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-storage (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-storage.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-storage"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-storage/yast2-storage.changes      
2013-09-17 15:07:55.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-storage.new/yast2-storage.changes 
2013-09-29 17:55:58.000000000 +0200
@@ -1,0 +2,28 @@
+Thu Sep 26 17:04:39 CEST 2013 - f...@suse.de
+
+- version 3.1.0
+- fix subvol handling for formatted existing root partitions 
+  (bnc#842505)
+
+-------------------------------------------------------------------
+Wed Sep 25 17:12:42 CEST 2013 - f...@suse.de
+
+- version 3.0.5
+- add code to support named raids (fate#315590)
+
+-------------------------------------------------------------------
+Wed Sep 25 14:13:07 CEST 2013 - aschn...@suse.de
+
+- removed popup asking for btrfs as default (bnc#839700)
+
+-------------------------------------------------------------------
+Wed Sep 25 11:32:37 CEST 2013 - f...@suse.de
+
+- fix sort order in SetTarget map (problem with in autoyast usage)
+
+-------------------------------------------------------------------
+Tue Sep 24 17:48:43 CEST 2013 - aschn...@suse.de
+
+- fixed moving partitions (bnc#841924)
+
+-------------------------------------------------------------------

Old:
----
  yast2-storage-3.0.4.tar.bz2

New:
----
  yast2-storage-3.1.0.tar.bz2

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

Other differences:
------------------
++++++ yast2-storage.spec ++++++
--- /var/tmp/diff_new_pack.TtMCge/_old  2013-09-29 17:55:59.000000000 +0200
+++ /var/tmp/diff_new_pack.TtMCge/_new  2013-09-29 17:55:59.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-storage
-Version:        3.0.4
+Version:        3.1.0
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -38,8 +38,8 @@
 BuildRequires:  yast2-core-devel >= 2.23.1
 BuildRequires:  yast2-devtools
 BuildRequires:  yast2-testsuite >= 2.19.0
-Requires:       libstorage-ruby >= 2.24.3
-Requires:       libstorage4 >= 2.24.3
+Requires:       libstorage-ruby >= 2.24.5
+Requires:       libstorage4 >= 2.24.5
 Requires:       rubygem-ruby-dbus
 Requires:       yast2 >= 2.19.4
 Requires:       yast2-core >= 2.18.3

++++++ yast2-storage-3.0.4.tar.bz2 -> yast2-storage-3.1.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-storage-3.0.4/VERSION 
new/yast2-storage-3.1.0/VERSION
--- old/yast2-storage-3.0.4/VERSION     2013-09-17 10:56:54.000000000 +0200
+++ new/yast2-storage-3.1.0/VERSION     2013-09-26 17:11:55.000000000 +0200
@@ -1 +1 @@
-3.0.4
+3.1.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-storage-3.0.4/configure 
new/yast2-storage-3.1.0/configure
--- old/yast2-storage-3.0.4/configure   2013-09-17 10:57:24.000000000 +0200
+++ new/yast2-storage-3.1.0/configure   2013-09-26 17:12:20.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for yast2-storage 3.0.4.
+# Generated by GNU Autoconf 2.69 for yast2-storage 3.1.0.
 #
 # Report bugs to <http://bugs.opensuse.org/>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='yast2-storage'
 PACKAGE_TARNAME='yast2-storage'
-PACKAGE_VERSION='3.0.4'
-PACKAGE_STRING='yast2-storage 3.0.4'
+PACKAGE_VERSION='3.1.0'
+PACKAGE_STRING='yast2-storage 3.1.0'
 PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
 PACKAGE_URL=''
 
@@ -1380,7 +1380,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures yast2-storage 3.0.4 to adapt to many kinds of systems.
+\`configure' configures yast2-storage 3.1.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1451,7 +1451,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of yast2-storage 3.0.4:";;
+     short | recursive ) echo "Configuration of yast2-storage 3.1.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1569,7 +1569,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-yast2-storage configure 3.0.4
+yast2-storage configure 3.1.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2022,7 +2022,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by yast2-storage $as_me 3.0.4, which was
+It was created by yast2-storage $as_me 3.1.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2961,7 +2961,7 @@
 
 # Define the identity of the package.
  PACKAGE='yast2-storage'
- VERSION='3.0.4'
+ VERSION='3.1.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3084,7 +3084,7 @@
 
 
 
-VERSION="3.0.4"
+VERSION="3.1.0"
 RPMNAME="yast2-storage"
 MAINTAINER="Arvin Schnell <aschn...@suse.de>"
 
@@ -16761,7 +16761,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by yast2-storage $as_me 3.0.4, which was
+This file was extended by yast2-storage $as_me 3.1.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16827,7 +16827,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-yast2-storage config.status 3.0.4
+yast2-storage config.status 3.1.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-storage-3.0.4/configure.ac 
new/yast2-storage-3.1.0/configure.ac
--- old/yast2-storage-3.0.4/configure.ac        2013-09-17 10:57:08.000000000 
+0200
+++ new/yast2-storage-3.1.0/configure.ac        2013-09-26 17:12:07.000000000 
+0200
@@ -3,7 +3,7 @@
 dnl -- This file is generated by y2autoconf 3.0.5 - DO NOT EDIT! --
 dnl    (edit configure.ac.in or configure.in.in instead)
 
-AC_INIT(yast2-storage, 3.0.4, http://bugs.opensuse.org/, yast2-storage)
+AC_INIT(yast2-storage, 3.1.0, http://bugs.opensuse.org/, yast2-storage)
 dnl Check for presence of file 'RPMNAME'
 AC_CONFIG_SRCDIR([RPMNAME])
 
@@ -18,7 +18,7 @@
 AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
 
 dnl Important YaST2 variables
-VERSION="3.0.4"
+VERSION="3.1.0"
 RPMNAME="yast2-storage"
 MAINTAINER="Arvin Schnell <aschn...@suse.de>"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-3.0.4/src/clients/inst_disk_proposal.rb 
new/yast2-storage-3.1.0/src/clients/inst_disk_proposal.rb
--- old/yast2-storage-3.0.4/src/clients/inst_disk_proposal.rb   2013-09-12 
14:17:53.000000000 +0200
+++ new/yast2-storage-3.1.0/src/clients/inst_disk_proposal.rb   2013-09-25 
14:16:54.000000000 +0200
@@ -86,13 +86,6 @@
       @changes = ""
       if Storage.GetPartProposalFirst
 
-        # see bnc#839700
-        if Popup.YesNo(_("Would you like to use the next generation\n" +
-                         "Linux file system \"btrfs\" by default?"))
-          StorageProposal.GetControlCfg()
-          StorageProposal.SetProposalBtrfs(true)
-        end
-
         @prop = StorageProposal.get_inst_prop(Storage.GetTargetMap)
         Builtins.y2milestone("prop ok:%1", Ops.get_boolean(@prop, "ok", false))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-storage-3.0.4/src/clients/inst_prepdisk.rb 
new/yast2-storage-3.1.0/src/clients/inst_prepdisk.rb
--- old/yast2-storage-3.0.4/src/clients/inst_prepdisk.rb        2013-07-30 
13:45:30.000000000 +0200
+++ new/yast2-storage-3.1.0/src/clients/inst_prepdisk.rb        2013-09-25 
14:38:40.000000000 +0200
@@ -169,6 +169,8 @@
       # close progress on running system
       SlideShow.CloseDialog if Mode.normal
 
+      Builtins.y2debug("writing target-map %1", Storage.GetTargetMap)
+
       SCR.Write(
         path(".target.ycp"),
         Storage.SaveDumpPath("targetMap_pe"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-3.0.4/src/include/partitioning/ep-raid-dialogs.rb 
new/yast2-storage-3.1.0/src/include/partitioning/ep-raid-dialogs.rb
--- old/yast2-storage-3.0.4/src/include/partitioning/ep-raid-dialogs.rb 
2013-08-20 15:36:50.000000000 +0200
+++ new/yast2-storage-3.1.0/src/include/partitioning/ep-raid-dialogs.rb 
2013-09-26 11:06:55.000000000 +0200
@@ -24,6 +24,7 @@
 # Summary:     Expert Partitioner
 # Authors:     Arvin Schnell <aschn...@suse.de>
 module Yast
+  Yast.import "String"
   module PartitioningEpRaidDialogsInclude
     def initialize_partitioning_ep_raid_dialogs(include_target)
       textdomain "storage"
@@ -113,6 +114,16 @@
       helptext = Ops.add(
         helptext,
         _(
+          "<p><b>Raid Name</b> gives you the possibility to provide a 
meaningful\n" +
+            "name for the raid. This is optional. If name is provided, the 
device is\n" +
+           "available as <tt>/dev/md/&lt;name&gt;</tt>.</p>\n"
+        )
+      )
+
+      # helptext
+      helptext = Ops.add(
+        helptext,
+        _(
           "<p>Add partitions to your RAID. According to\n" +
             "the RAID type, the usable disk size is the sum of these 
partitions (RAID0), the size\n" +
             "of the smallest partition (RAID 1), or (N-1)*smallest partition 
(RAID 5).</p>\n"
@@ -174,59 +185,69 @@
         Left(
           # heading
           HVSquash(
-            term(
-              :FrameWithMarginBox,
-              _("RAID Type"),
-              RadioButtonGroup(
-                Id(:raid_type),
-                VBox(
-                  # Translators, 'Striping' is a technical term here. 
Translate only if
-                  # you are sure!! If in doubt, leave it in English.
-                  term(
-                    :LeftRadioButton,
-                    Id(:raid0),
-                    Opt(:notify),
-                    _("RAID &0  (Striping)"),
-                    raid_type == "raid0"
-                  ),
-                  # Translators, 'Mirroring' is a technical term here. 
Translate only if
-                  # you are sure!! If in doubt, leave it in English.
-                  term(
-                    :LeftRadioButton,
-                    Id(:raid1),
-                    Opt(:notify),
-                    _("RAID &1  (Mirroring)"),
-                    raid_type == "raid1"
-                  ),
-                  # Translators, 'Redundant Striping' is a technical term 
here. Translate
-                  # only if you are sure!! If in doubt, leave it in English.
-                  term(
-                    :LeftRadioButton,
-                    Id(:raid5),
-                    Opt(:notify),
-                    _("RAID &5  (Redundant Striping)"),
-                    raid_type == "raid5"
-                  ),
-                  # Translators, 'Redundant Striping' is a technical term 
here. Translate only if
-                  # you are sure!! If in doubt, leave it in English.
-                  term(
-                    :LeftRadioButton,
-                    Id(:raid6),
-                    Opt(:notify),
-                    _("RAID &6  (Dual Redundant Striping)"),
-                    raid_type == "raid6"
-                  ),
-                  # Translators, 'Mirroring' and 'Striping' are technical 
terms here. Translate only if
-                  # you are sure!! If in doubt, leave it in English.
-                  term(
-                    :LeftRadioButton,
-                    Id(:raid10),
-                    Opt(:notify),
-                    _("RAID &10  (Mirroring and Striping)"),
-                    raid_type == "raid10"
-                  )
-                )
-              )
+           HBox(
+             term(
+               :FrameWithMarginBox,
+               _("RAID Type"),
+               RadioButtonGroup(
+                 Id(:raid_type),
+                 VBox(
+                   # Translators, 'Striping' is a technical term here. 
Translate only if
+                   # you are sure!! If in doubt, leave it in English.
+                   term(
+                     :LeftRadioButton,
+                     Id(:raid0),
+                     Opt(:notify),
+                     _("RAID &0  (Striping)"),
+                     raid_type == "raid0"
+                   ),
+                   # Translators, 'Mirroring' is a technical term here. 
Translate only if
+                   # you are sure!! If in doubt, leave it in English.
+                   term(
+                     :LeftRadioButton,
+                     Id(:raid1),
+                     Opt(:notify),
+                     _("RAID &1  (Mirroring)"),
+                     raid_type == "raid1"
+                   ),
+                   # Translators, 'Redundant Striping' is a technical term 
here. Translate
+                   # only if you are sure!! If in doubt, leave it in English.
+                   term(
+                     :LeftRadioButton,
+                     Id(:raid5),
+                     Opt(:notify),
+                     _("RAID &5  (Redundant Striping)"),
+                     raid_type == "raid5"
+                   ),
+                   # Translators, 'Redundant Striping' is a technical term 
here. Translate only if
+                   # you are sure!! If in doubt, leave it in English.
+                   term(
+                     :LeftRadioButton,
+                     Id(:raid6),
+                     Opt(:notify),
+                     _("RAID &6  (Dual Redundant Striping)"),
+                     raid_type == "raid6"
+                   ),
+                   # Translators, 'Mirroring' and 'Striping' are technical 
terms here. Translate only if
+                   # you are sure!! If in doubt, leave it in English.
+                   term(
+                     :LeftRadioButton,
+                     Id(:raid10),
+                     Opt(:notify),
+                     _("RAID &10  (Mirroring and Striping)"),
+                     raid_type == "raid10"
+                   )
+                 )
+               )
+             ),
+             HSpacing(1),
+             Top(
+               TextEntry(
+                 Id(:raid_name),
+                 # label text
+                 _("Raid &Name (optional)")
+               )
+             )
             )
           )
         )
@@ -254,6 +275,8 @@
       )
       MiniWorkflow.SetLastStep(false)
 
+      UI.ChangeWidget(Id(:raid_name), :ValidChars, 
Builtins.deletechars(String.CGraph, "'\""))
+
       widget = nil
       begin
         widget = MiniWorkflow.UserInput
@@ -280,8 +303,14 @@
       end until widget == :abort || widget == :back || widget == :next
 
       if widget == :next
-        Ops.set(data.value, "raid_type", raid_type)
-        Ops.set(data.value, "devices", devices)
+        rname = UI.QueryWidget(Id(:raid_name), :Value)
+       if !rname.empty?
+         data.value["device"] = "/dev/md/"+rname
+       else
+         data.value["device"] = "/dev/md"+data.value.fetch("nr",0).to_s
+       end
+        data.value["raid_type"] = raid_type
+        data.value["devices"] = devices
 
         size_k = 0
         size_k_ref = arg_ref(size_k)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-3.0.4/src/include/partitioning/ep-raid-lib.rb 
new/yast2-storage-3.1.0/src/include/partitioning/ep-raid-lib.rb
--- old/yast2-storage-3.0.4/src/include/partitioning/ep-raid-lib.rb     
2013-08-12 11:41:49.000000000 +0200
+++ new/yast2-storage-3.1.0/src/include/partitioning/ep-raid-lib.rb     
2013-09-26 11:06:55.000000000 +0200
@@ -29,7 +29,7 @@
       textdomain "storage"
     end
 
-    def AddDevices(raid_nr, devs)
+    def AddDevices(raid_dev, devs)
       devs = deep_copy(devs)
       ret = true
 
@@ -37,25 +37,25 @@
         Storage.SetPartitionId(dev, Partitions.fsid_raid)
         Storage.SetPartitionFormat(dev, false, :none)
       end
-      ret = false if !Storage.ExtendMd(raid_nr, devs)
+      ret = false if !Storage.ExtendMd(raid_dev, devs)
 
       ret
     end
 
 
-    def RemoveDevices(raid_nr, devs)
+    def RemoveDevices(raid_dev, devs)
       devs = deep_copy(devs)
       ret = true
 
       Builtins.foreach(devs) do |dev|
         Storage.UnchangePartitionId(dev)
-        ret = false if !Storage.ShrinkMd(raid_nr, [dev])
+        ret = false if !Storage.ShrinkMd(raid_dev, [dev])
       end
 
       ret
     end
 
-    def ReplaceDevices(raid_nr, devs)
+    def ReplaceDevices(raid_dev, devs)
       devs = deep_copy(devs)
       ret = true
 
@@ -63,7 +63,7 @@
         Storage.SetPartitionId(dev, Partitions.fsid_raid)
         Storage.SetPartitionFormat(dev, false, :none)
       end
-      ret = false if !Storage.ReplaceMd(raid_nr, devs)
+      ret = false if !Storage.ReplaceMd(raid_dev, devs)
 
       ret
     end
@@ -113,17 +113,15 @@
           data = data_ref.value;
           _DlgCreateRaidNew_result
         )
-        nr = Ops.get_integer(data, "nr", 0)
-        raid_type = Builtins.tosymbol(
-          Ops.get_string(data, "raid_type", "raid0")
-        )
+        dev = data.fetch("device","")
+        raid_type = Builtins.tosymbol(data.fetch("raid_type","raid0"))
 
-        if Storage.CreateMdWithDevs(nr, raid_type, [])
+        if Storage.CreateMdWithDevs(dev, raid_type, [])
           devices = Ops.get_list(data, "devices", [])
-          AddDevices(nr, devices)
+          AddDevices(dev, devices)
 
           chunk_size_k = Ops.get_integer(data, "chunk_size_k", 4)
-          Storage.ChangeMdChunk(nr, chunk_size_k)
+          Storage.ChangeMdChunk(dev, chunk_size_k)
 
           if Builtins.haskey(data, "parity_algorithm")
             parity_algorithm = Ops.get_symbol(
@@ -132,7 +130,7 @@
               :par_default
             )
            if( parity_algorithm!=:par_default )
-             Storage.ChangeMdParitySymbol(nr, parity_algorithm)
+             Storage.ChangeMdParitySymbol(dev, parity_algorithm)
            end
           end
 
@@ -236,12 +234,11 @@
           data = data_ref.value;
           _DlgResizeRaid_result
         )
-        raid_nr = Ops.get_integer(data, "nr", 0)
-
+        dev = data.fetch("device","")
         devices_new = Ops.get_list(data, "devices_new", [])
         Builtins.y2milestone("devices_new:%1", devices_new)
         if Ops.greater_than(Builtins.size(devices_new), 0)
-          ReplaceDevices(raid_nr, devices_new)
+          ReplaceDevices(dev, devices_new)
           UpdateMainStatus()
           UpdateNavigationTree(nil)
           TreePanel.Create
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-storage-3.0.4/src/modules/Storage.rb 
new/yast2-storage-3.1.0/src/modules/Storage.rb
--- old/yast2-storage-3.0.4/src/modules/Storage.rb      2013-09-13 
12:41:54.000000000 +0200
+++ new/yast2-storage-3.1.0/src/modules/Storage.rb      2013-09-26 
17:11:55.000000000 +0200
@@ -2539,7 +2539,7 @@
         start,
         len
       )
-      ret = @sint.updatePartitionArea(device start, len)
+      ret = @sint.updatePartitionArea(device, start, len)
       if ret<0
         Builtins.y2error("UpdatePartition sint ret:%1", ret)
       end
@@ -2547,6 +2547,7 @@
       ret == 0
     end
 
+
     # Sets a mountpoint for partition
     #
     # @param [String] device name
@@ -2899,7 +2900,7 @@
         d = part.fetch("device","")
         fmt = part.fetch("format",false)
         rem = part["subvol"].select { |p| p.fetch("delete",false) }
-        cre = part["subvol"].select { |p| p.fetch("create",false)||fmt }
+        cre = part["subvol"].select { |p| 
!p.fetch("delete",false)&&(p.fetch("create",false)||fmt) }
         Builtins.y2milestone("ChangeVolumeProperties rem:%1", rem)
         Builtins.y2milestone("ChangeVolumeProperties cre:%1", cre)
         while ret == 0 && !rem.empty?
@@ -3195,11 +3196,22 @@
       ret == 0
     end
 
+    def MdToDev(nr_or_string)
+      Builtins.y2milestone("MdToDev nr_or:%1", nr_or_string)
+      if Ops.is_string?(nr_or_string)
+         ret = nr_or_string
+      else 
+         ret = "/dev/md"+nr_or_string.to_s
+      end
+      Builtins.y2milestone("MdToDev ret:%1", ret)
+      ret
+    end
+
     def CreateMd(nr, type)
       Builtins.y2milestone("CreateMd nr:%1 type:%2", nr, type)
       tmp = Ops.get(@conv_mdstring, type, 0)
       empty = ::Storage::ListString.new()
-      rd = Builtins.sformat("/dev/md%1", nr)
+      rd = MdToDev(nr)
       ret = @sint.createMd(rd, tmp, empty, empty)
       Builtins.y2error("CreateMd sint ret:%1", ret) if ret<0
       UpdateTargetMapDisk("/dev/md")
@@ -3227,7 +3239,7 @@
       end
       empty = ::Storage::ListString.new()
       devs = StringListFromList(devices);
-      rd = Builtins.sformat("/dev/md%1", nr)
+      rd = MdToDev(nr)
       ret = @sint.createMd(rd, tmp, devs, empty)
       if ret<0
         Builtins.y2error("CreateMdWithDevs sint ret:%1", ret)
@@ -3240,7 +3252,7 @@
       Builtins.y2milestone("ReplaceMd nr:%1 devs:%2", nr, devs)
       empty = ::Storage::ListString.new()
       devices = StringListFromList(devs);
-      rd = Builtins.sformat("/dev/md%1", nr)
+      rd = MdToDev(nr)
       ret = @sint.updateMd(rd, devices, empty)
       Builtins.y2error("ReplaceMd sint ret:%1", ret) if ret<0
       UpdateTargetMap()
@@ -3251,7 +3263,7 @@
       Builtins.y2milestone("ExtendMd nr:%1 devs:%2", nr, devs)
       empty = ::Storage::ListString.new()
       devices = StringListFromList(devs);
-      rd = Builtins.sformat("/dev/md%1", nr)
+      rd = MdToDev(nr)
       ret = @sint.extendMd(rd, devices, empty)
       Builtins.y2error("ExtendMd sint ret:%1", ret) if ret<0
       UpdateTargetMap()
@@ -3262,7 +3274,7 @@
       Builtins.y2milestone("ShrinkMd nr:%1 devs:%2", nr, devs)
       empty = ::Storage::ListString.new()
       devices = StringListFromList(devs);
-      rd = Builtins.sformat("/dev/md%1", nr)
+      rd = MdToDev(nr)
       ret = @sint.shrinkMd(rd, devices, empty)
       Builtins.y2error("ShrinkMd sint ret:%1", ret) if ret<0
       UpdateTargetMap()
@@ -3271,7 +3283,7 @@
 
     def ChangeMdType(nr, mdtype)
       Builtins.y2milestone("ChangeMdType nr:%1 mdtype:%2", nr, mdtype)
-      rd = Builtins.sformat("/dev/md%1", nr)
+      rd = MdToDev(nr)
       tmp = Ops.get(@conv_mdstring, mdtype, 0)
       ret = @sint.changeMdType(rd, tmp)
       Builtins.y2error("ChangeMdType sint ret:%1", ret) if ret<0
@@ -3281,7 +3293,7 @@
 
     def ChangeMdParity(nr, ptype)
       Builtins.y2milestone("ChangeMdParity nr:%1 parity:%2", nr, ptype)
-      rd = Builtins.sformat("/dev/md%1", nr)
+      rd = MdToDev(nr)
       tmp = Ops.get(@conv_parstring, ptype, 0)
       ret = @sint.changeMdParity(rd, tmp)
       if ret<0
@@ -3293,7 +3305,7 @@
 
     def ChangeMdParitySymbol(nr, ptype)
       Builtins.y2milestone("ChangeMdParitySymbol nr:%1 parity:%2", nr, ptype)
-      rd = Builtins.sformat("/dev/md%1", nr)
+      rd = MdToDev(nr)
       tmp = fromSymbol(@conv_mdparity, ptype)
       ret = @sint.changeMdParity(rd, tmp)
       if ret<0
@@ -3305,7 +3317,7 @@
 
     def ChangeMdChunk(nr, chunk)
       Builtins.y2milestone("ChangeMdChunk nr:%1 chunk:%2", nr, chunk)
-      rd = Builtins.sformat("/dev/md%1", nr)
+      rd = MdToDev(nr)
       ret = @sint.changeMdChunk(rd, chunk)
       if ret<0
         Builtins.y2error("ChangeMdChunk sint ret:%1", ret)
@@ -3317,7 +3329,7 @@
     def CheckMd(nr)
       Builtins.y2milestone("CheckMd nr:%1", nr)
       ret = 0
-      rd = Builtins.sformat("/dev/md%1", nr)
+      rd = MdToDev(nr)
       ret = @sint.checkMd(rd)
       Builtins.y2milestone("CheckMd sint ret:%1", ret) if ret != 0
       ret
@@ -3542,28 +3554,16 @@
           Ops.set(p.value, "mountby", mby)
         end
       elsif ctype == :CT_MD
-        ret = CreateMd(
-          Ops.get_integer(p.value, "nr", 0),
-          Ops.get_string(p.value, "raid_type", "raid1")
-        )
-        if ret && Builtins.haskey(p.value, "chunk_size")
-          ChangeMdChunk(
-            Ops.get_integer(p.value, "nr", 0),
-            Ops.get_integer(p.value, "chunk_size", 4)
-          )
-        end
-        if ret && HasRaidParity(Ops.get_string(p.value, "raid_type", "")) &&
-            Builtins.haskey(p.value, "parity_algorithm")
-          ChangeMdParity(
-            Ops.get_integer(p.value, "nr", 0),
-            Ops.get_string(p.value, "parity_algorithm", "")
-          )
+        ret = CreateMd( p.value["device"], p.value.fetch("raid_type","raid1") )
+        if ret && p.value.has_key?("chunk_size")
+          ChangeMdChunk( p.value["device"], p.value.fetch("chunk_size",4) )
+        end
+        if ret && HasRaidParity(p.value.fetch("raid_type","")) &&
+            p.value.has_key?("parity_algorithm")
+          ChangeMdParity( p.value["device"], 
p.value.fetch("parity_algorithm",""))
         end
         if ret
-          ret = ExtendMd(
-            Ops.get_integer(p.value, "nr", 0),
-            Ops.get_list(p.value, "devices", [])
-          )
+          ret = ExtendMd( p.value["device"], p.value.fetch("devices",[]))
         end
       elsif ctype == :CT_LOOP
         Builtins.y2milestone("CreateAny Loop p:%1", p.value)
@@ -4421,12 +4421,12 @@
             Builtins.foreach(tmp) do |dev, c|
               if Ops.get_symbol(c, "type", :CT_UNKNOWN) == :CT_DMRAID &&
                   Ops.get_integer(c, "minor", 0) == minor
-                Builtins.y2milestone("addind bios_id %1 to %2", bios, dev)
+                Builtins.y2milestone("adding bios_id %1 to %2", bios, dev)
                 Ops.set(tmp, [dev, "bios_id"], bios)
               end
               if Ops.get_symbol(c, "type", :CT_UNKNOWN) == :CT_MDPART &&
                   Ops.get_string(c, "device", "") == dm
-                Builtins.y2milestone("addind bios_id %1 to %2", bios, dev)
+                Builtins.y2milestone("adding bios_id %1 to %2", bios, dev)
                 Ops.set(tmp, [dev, "bios_id"], bios)
               end
             end
@@ -4693,23 +4693,14 @@
           !Ops.get_boolean(p, "delete", false) &&
             Ops.get_boolean(p, "create", false)
         end
-        if Ops.greater_than(Builtins.size(dps), 1) &&
-            Builtins.haskey(Ops.get(dps, 0, {}), "nr")
-          dps = Builtins.sort(dps) do |a, b|
-            Ops.less_than(
-              Ops.get_integer(a, "nr", 0),
-              Ops.get_integer(b, "nr", 0)
-            )
-          end
-        end
-        if Ops.greater_than(Builtins.size(dps), 1) &&
-            Builtins.haskey(Ops.get(dps, 0, {}), "name")
-          dps = Builtins.sort(dps) do |a, b|
-            Ops.greater_than(
-              Ops.get_boolean(a, "pool", false),
-              Ops.get_boolean(b, "pool", false)
-            )
+        if dps.size>1
+         Builtins.y2milestone("SetTargetMap dps:%1",dps)
+         if dps.fetch(0,{}).has_key?("nr")
+           dps.sort! { |a, b| a.fetch("nr",0)<=>b.fetch("nr",0) }
+         elsif dps.fetch(0,{}).fetch("type",:none)==:lvm
+           dps = dps.partition { |a| a.fetch("pool",false) }
           end
+         Builtins.y2milestone("SetTargetMap dps:%1",dps)
         end
         Builtins.foreach(dps) do |p|
           p_ref = arg_ref(p)
@@ -4897,30 +4888,28 @@
       def_subvol.sort!()
 
       sv_prepend = ""
-      Builtins.y2milestone(
-        "AddSubvolRoot subvol:%1",
-        Ops.get_list(part, "subvol", [])
-      )
+      lst = part.fetch("subvol",[])
+      Builtins.y2milestone("AddSubvolRoot subvol:%1", lst)
       if FileSystems.default_subvol != ""
-        sv_prepend = Ops.add(FileSystems.default_subvol, "/")
+        sv_prepend = FileSystems.default_subvol+"/"
       end
-      Builtins.foreach(def_subvol) do |s|
-        svn = Ops.add(sv_prepend, s)
-        if Builtins.find(Ops.get_list(part, "subvol", [])) do |p|
-            Ops.get_string(p, "name", "") == svn
-          end == nil
-          Ops.set(
-            part,
-            "subvol",
-            Builtins.add(
-              Ops.get_list(part, "subvol", []),
-              { "create" => true, "name" => svn }
-            )
-          )
+      fmt = part.fetch("format",false)
+      names = []
+      if !fmt
+       names = ls.select { |s| !s.fetch("delete",false) }.each { |s| 
s.fetch("name","") }
+      else
+       lst = []
+      end
+      Builtins.y2milestone("AddSubvolRoot subvol names:%1 lst:%2", names, lst)
+      def_subvol.each do |s|
+        svn = sv_prepend+s
+        if !names.include?( svn )
+         lst.push( { "create" => true, "name" => svn } )
         end
       end
+      part["subvol"] = lst;
       Builtins.y2milestone("AddSubvolRoot part:%1", part)
-      deep_copy(part)
+      part
     end
 
 

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to