Hello community,
here is the log from the commit of package yast2-storage for openSUSE:Factory
checked in at Sat Oct 3 00:49:02 CEST 2009.
--------
--- yast2-storage/yast2-storage.changes 2009-08-11 13:38:42.000000000 +0200
+++ yast2-storage/yast2-storage.changes 2009-09-29 17:21:48.000000000 +0200
@@ -1,0 +2,11 @@
+Tue Sep 29 17:15:34 CEST 2009 - aschnell@suse.de
+
+- fixed buttons in lvm view
+
+-------------------------------------------------------------------
+Tue Sep 22 15:17:10 CEST 2009 - jsrain@suse.cz
+
+- don't limit partition table to GPT on x86_64 uEFI systems
+ (fate #306825)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage.spec ++++++
--- /var/tmp/diff_new_pack.I0Zg1j/_old 2009-10-03 00:47:12.000000000 +0200
+++ /var/tmp/diff_new_pack.I0Zg1j/_new 2009-10-03 00:47:12.000000000 +0200
@@ -20,7 +20,7 @@
Name: yast2-storage
Version: 2.18.18
-Release: 3
+Release: 4
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: yast2-storage-2.18.18.tar.bz2
Prefix: /usr
@@ -97,6 +97,7 @@
/usr/share/YaST2/clients/inst_prepdisk.ycp
/usr/share/YaST2/clients/storage_finish.ycp
/usr/share/YaST2/clients/partitions_proposal.ycp
+/usr/share/YaST2/clients/storage.ycp
/usr/share/YaST2/clients/disk.ycp
/usr/share/YaST2/clients/disk_worker.ycp
/usr/share/YaST2/clients/multipath-simple.ycp
++++++ yast2-storage-2.18.18.tar.bz2 ++++++
++++ 1939 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/configure.in new/yast2-storage-2.18.18/configure.in
--- old/yast2-storage-2.18.18/configure.in 2009-08-11 13:36:02.000000000 +0200
+++ new/yast2-storage-2.18.18/configure.in 2009-09-29 16:40:24.000000000 +0200
@@ -1,6 +1,6 @@
dnl configure.in for yast2-storage
dnl
-dnl -- This file is generated by y2autoconf 2.18.9 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.18.11 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
AC_INIT(yast2-storage, 2.18.18, http://bugs.opensuse.org/, yast2-storage)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/disk/src/Makefile.am new/yast2-storage-2.18.18/disk/src/Makefile.am
--- old/yast2-storage-2.18.18/disk/src/Makefile.am 2009-07-21 16:37:07.000000000 +0200
+++ new/yast2-storage-2.18.18/disk/src/Makefile.am 2009-09-29 16:31:59.000000000 +0200
@@ -3,6 +3,7 @@
#
client_DATA = \
+ storage.ycp \
disk.ycp \
disk_worker.ycp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/disk/src/storage.ycp new/yast2-storage-2.18.18/disk/src/storage.ycp
--- old/yast2-storage-2.18.18/disk/src/storage.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-storage-2.18.18/disk/src/storage.ycp 2009-09-29 16:32:46.000000000 +0200
@@ -0,0 +1,6 @@
+/**
+ * Summary: Alias for disk client.
+ */
+{
+ return WFM::CallFunction("disk", WFM::Args());
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/storage/src/include/custom_part_lib.ycp new/yast2-storage-2.18.18/storage/src/include/custom_part_lib.ycp
--- old/yast2-storage-2.18.18/storage/src/include/custom_part_lib.ycp 2009-07-23 13:49:37.000000000 +0200
+++ new/yast2-storage-2.18.18/storage/src/include/custom_part_lib.ycp 2009-08-24 16:27:39.000000000 +0200
@@ -13,7 +13,7 @@
*
*************************************************************
*
- $Id: custom_part_lib.ycp 58139 2009-07-23 11:49:39Z aschnell $
+ $Id: custom_part_lib.ycp 58336 2009-08-13 12:05:21Z aschnell $
*
*/
@@ -364,7 +364,7 @@
// error popup
Popup::Error(_("Only swap devices may have swap as mount point."));
}
- else if (mount != "swap" || part["type"]:`unknown == `loop)
+ else if (mount != "swap") // || part["type"]:`unknown == `loop)
{
// check if the mount point is already in use
foreach( string disk, map diskinfo, targetMap, ``{
@@ -377,7 +377,7 @@
});
});
- if( allowed == false && mount!="swap" )
+ if (allowed == false) // && mount!="swap" )
{
// error popup text
Popup::Error(_("This mount point is already in use. Select a different one."));
@@ -537,8 +537,7 @@
define boolean EmptyCryptPwdAllowed( map p )
{
boolean ret = p["format"]:false &&
- contains( union(FileSystems::tmp_m_mpoint,["swap"]),
- p["mount"]:"" );
+ contains(union(FileSystems::tmp_m_points, FileSystems::swap_m_points), p["mount"]:"");
ret = ret && Storage::IsPersistent( p );
y2milestone( "EmptyCryptPwdAllowed ret:%1", ret );
return( ret );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/storage/src/include/ep-dialogs.ycp new/yast2-storage-2.18.18/storage/src/include/ep-dialogs.ycp
--- old/yast2-storage-2.18.18/storage/src/include/ep-dialogs.ycp 2009-07-27 15:57:37.000000000 +0200
+++ new/yast2-storage-2.18.18/storage/src/include/ep-dialogs.ycp 2009-09-29 13:43:59.000000000 +0200
@@ -21,6 +21,10 @@
formatted and the desired file system type.</p>");
// helptext
+ helptext = helptext + _("<p>Changing the encryption on an existing
+volume will delete all data on it.</p>");
+
+ // helptext
helptext = helptext + _("<p>Then, choose whether the partition should
be mounted and enter the mount point (/, /boot, /usr, /var, etc.).</p>");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/storage/src/include/ep-dm.ycp new/yast2-storage-2.18.18/storage/src/include/ep-dm.ycp
--- old/yast2-storage-2.18.18/storage/src/include/ep-dm.ycp 2009-07-21 16:37:06.000000000 +0200
+++ new/yast2-storage-2.18.18/storage/src/include/ep-dm.ycp 2009-08-26 11:40:50.000000000 +0200
@@ -13,6 +13,19 @@
include "partitioning/ep-dm-lib.ycp";
+ void EpContextMenuDm(string device)
+ {
+ symbol widget = ContextMenu::Simple([ `item(`id(`edit), _("Edit")) ]);
+
+ switch (widget)
+ {
+ case `edit:
+ EpEditDmDevice(device);
+ break;
+ }
+ }
+
+
void CreateDmMainPanel(any user_data)
{
symbol Predicate(map disk, map partition)
@@ -35,7 +48,7 @@
`HStretch(),
// heading
`IconAndHeading(_("Device Mapper (DM)"), StorageIcons::dm_icon),
- `Table(`id(`table), `opt(`keepSorting, `notify),
+ `Table(`id(`table), `opt(`keepSorting, `notify, `notifyContextMenu),
table_header, table_contents)
)
)
@@ -50,6 +63,21 @@
}
+ void HandleDmMainPanel(any user_data, map event)
+ {
+ string device = (string) UI::QueryWidget(`id(`table), `CurrentItem);
+
+ switch (Event::IsWidgetContextMenuActivated(event))
+ {
+ case `table:
+ EpContextMenuDevice(device);
+ break;
+ }
+
+ UI::SetFocus(`id(`table));
+ }
+
+
void CreateDmOverviewTab(any user_data)
{
string dm_device = (string) user_data;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/storage/src/include/ep-lib.ycp new/yast2-storage-2.18.18/storage/src/include/ep-lib.ycp
--- old/yast2-storage-2.18.18/storage/src/include/ep-lib.ycp 2009-08-05 17:35:33.000000000 +0200
+++ new/yast2-storage-2.18.18/storage/src/include/ep-lib.ycp 2009-09-29 17:07:44.000000000 +0200
@@ -41,6 +41,27 @@
}
+ void SplitDevice(map target_map, string device, map& disk, map& part)
+ {
+ map disk_tmp = target_map[device]:nil;
+ map part_tmp = nil;
+
+ if (disk_tmp == nil)
+ {
+ foreach(string s, map d, target_map, {
+ part_tmp = find(map p, d["partitions"]:[], { return p["device"]:"" == device; });
+ if (part_tmp != nil) {
+ disk_tmp = d;
+ break;
+ }
+ });
+ }
+
+ disk = disk_tmp;
+ part = part_tmp;
+ }
+
+
/**
* Must be called before removing device.
*/
@@ -48,23 +69,15 @@
{
map target_map = Storage::GetTargetMap();
- map disk = target_map[device]:nil;
+ map disk = nil;
map part = nil;
- if (disk == nil)
- {
- foreach(string s, map d, target_map, {
- part = find(map p, d["partitions"]:[], { return p["device"]:"" == device; });
- if (part != nil) {
- disk = d;
- break;
- }
- });
- }
+ SplitDevice(target_map, device, disk, part);
return disk["device"]:"";
}
+
boolean ConfirmDeletingUsedDevice( map tg, map part, symbol used_by )
{
string device = part["device"]:"";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/storage/src/include/ep-loop.ycp new/yast2-storage-2.18.18/storage/src/include/ep-loop.ycp
--- old/yast2-storage-2.18.18/storage/src/include/ep-loop.ycp 2009-07-21 16:37:06.000000000 +0200
+++ new/yast2-storage-2.18.18/storage/src/include/ep-loop.ycp 2009-08-26 11:45:47.000000000 +0200
@@ -30,6 +30,7 @@
}
}
+
term LoopButtonBox()
{
return `HBox(
@@ -40,6 +41,7 @@
);
}
+
void HandleLoopButtons( string part_device, map event )
{
switch (Event::IsWidgetActivated(event))
@@ -58,6 +60,7 @@
}
}
+
void CreateLoopMainPanel(any user_data)
{
symbol Predicate(map disk, map partition)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/storage/src/include/ep-lvm-dialogs.ycp new/yast2-storage-2.18.18/storage/src/include/ep-lvm-dialogs.ycp
--- old/yast2-storage-2.18.18/storage/src/include/ep-lvm-dialogs.ycp 2009-07-21 16:37:06.000000000 +0200
+++ new/yast2-storage-2.18.18/storage/src/include/ep-lvm-dialogs.ycp 2009-08-19 14:26:55.000000000 +0200
@@ -364,7 +364,7 @@
string MiniWorkflowStepLvSizeHelptext()
{
// helptext
- string helptext = _("<p>Enter the size aswell as the number and size
+ string helptext = _("<p>Enter the size as well as the number and size
of stripes for the new logical volume. The number of stripes cannot be higher
than the number of physical volumes of the volume group.</p>");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/storage/src/include/ep-lvm.ycp new/yast2-storage-2.18.18/storage/src/include/ep-lvm.ycp
--- old/yast2-storage-2.18.18/storage/src/include/ep-lvm.ycp 2009-07-28 14:11:06.000000000 +0200
+++ new/yast2-storage-2.18.18/storage/src/include/ep-lvm.ycp 2009-09-29 17:13:51.000000000 +0200
@@ -58,6 +58,7 @@
}
}
+
term LvmButtonBox()
{
return `HBox(
@@ -70,6 +71,7 @@
);
}
+
void HandleLvmButtons( any user_data, string device, map event )
{
string vg = "";
@@ -77,10 +79,15 @@
if (user_data == nil)
{
- map dev = Storage::GetDiskPartition( device );
- vg = (string) dev["disk"]:nil;
- // FIXME: is this necessary & sufficient condition?
- is_vg = (dev["nr"]:"" == "");
+ map target_map = Storage::GetTargetMap();
+
+ map disk = nil;
+ map part = nil;
+
+ SplitDevice(target_map, device, disk, part);
+
+ vg = disk["device"]:"";
+ is_vg = part == nil;
}
else
{
@@ -94,21 +101,21 @@
break;
case `edit:
- if ( is_vg )
+ if (is_vg)
TreePanel::SwitchToNew( vg );
else
EpEditLogicalVolume( device );
break;
case `resize:
- if ( is_vg )
+ if (is_vg)
EpResizeVolumeGroup( device);
else
EpResizeLogicalVolume ( device );
break;
case `delete:
- if ( is_vg )
+ if (is_vg)
EpDeleteVolumeGroup( device );
else
EpDeleteLogicalVolume ( device, UI::WidgetExists(`id(`table)) ? `table : `overview );
@@ -179,7 +186,6 @@
HandleLvmButtons( user_data, device, event );
-
switch (Event::IsWidgetContextMenuActivated(event))
{
case `table:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/storage/src/include/ep-main.ycp new/yast2-storage-2.18.18/storage/src/include/ep-main.ycp
--- old/yast2-storage-2.18.18/storage/src/include/ep-main.ycp 2009-08-05 17:33:01.000000000 +0200
+++ new/yast2-storage-2.18.18/storage/src/include/ep-main.ycp 2009-09-29 17:07:53.000000000 +0200
@@ -98,7 +98,7 @@
`lvm : $[ `create : CreateLvmMainPanel, `handle : HandleLvmMainPanel ],
`md : $[ `create : CreateRaidMainPanel, `handle : HandleRaidMainPanel ],
`loop : $[ `create : CreateLoopMainPanel, `handle : HandleLoopMainPanel ],
- `dm : $[ `create : CreateDmMainPanel ],
+ `dm : $[ `create : CreateDmMainPanel, `handle : HandleDmMainPanel ],
`nfs : $[ `create : CreateNfsMainPanel, `handle : HandleNfsMainPanel ],
`unused : $[ `create : CreateUnusedPanel, `handle : HandleUnusedPanel ],
`graph : $[ `create : CreateGraphPanel, `refresh : RefreshGraphPanel, `handle : HandleGraphPanel ],
@@ -232,19 +232,10 @@
{
map target_map = Storage::GetTargetMap();
- map disk = target_map[device]:nil;
+ map disk = nil;
map part = nil;
- if (disk == nil)
- {
- foreach(string s, map d, target_map, {
- part = find(map p, d["partitions"]:[], { return p["device"]:"" == device; });
- if (part != nil) {
- disk = d;
- break;
- }
- });
- }
+ SplitDevice(target_map, device, disk, part);
switch (disk["type"]:`unknown)
{
@@ -273,6 +264,11 @@
else
EpContextMenuLvmLv(device);
break;
+
+ case `CT_DM:
+ if (part != nil)
+ EpContextMenuDm(device);
+ break;
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/storage/src/include/ep-unused.ycp new/yast2-storage-2.18.18/storage/src/include/ep-unused.ycp
--- old/yast2-storage-2.18.18/storage/src/include/ep-unused.ycp 2009-07-21 16:37:06.000000000 +0200
+++ new/yast2-storage-2.18.18/storage/src/include/ep-unused.ycp 2009-08-26 11:44:00.000000000 +0200
@@ -54,7 +54,7 @@
`VBox(
// heading
`IconAndHeading(_("Unused Devices"), StorageIcons::unused_icon),
- `Table(`id(`table), `opt(`keepSorting, `notify),
+ `Table(`id(`table), `opt(`keepSorting, `notify, `notifyContextMenu),
table_header, table_contents),
`HBox(
// push button text
@@ -75,6 +75,15 @@
void HandleUnusedPanel(any user_data, map event)
{
+ string device = (string) UI::QueryWidget(`id(`table), `CurrentItem);
+
+ switch (Event::IsWidgetContextMenuActivated(event))
+ {
+ case `table:
+ EpContextMenuDevice(device);
+ break;
+ }
+
switch (Event::IsWidgetActivated(event))
{
case `rescan:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/storage/src/modules/FileSystems.ycp new/yast2-storage-2.18.18/storage/src/modules/FileSystems.ycp
--- old/yast2-storage-2.18.18/storage/src/modules/FileSystems.ycp 2009-07-29 16:51:53.000000000 +0200
+++ new/yast2-storage-2.18.18/storage/src/modules/FileSystems.ycp 2009-08-12 17:27:17.000000000 +0200
@@ -8,7 +8,7 @@
* These module contains the supported filesystems and their settings.
*
*
- * $Id: FileSystems.ycp 58151 2009-07-24 13:39:35Z aschnell $
+ * $Id: FileSystems.ycp 58331 2009-08-12 14:12:53Z aschnell $
*/
{
module "FileSystems";
@@ -59,12 +59,14 @@
return( ret );
}
- global list<string> system_m_points = [ "/", "/usr", "/var", "/opt",
- Partitions::BootMount() ];
- global list<string> crypt_m_points = [ "/", Partitions::BootMount(), "/usr" ];
- list<string> suggest_m_points = [];
- global list<string> swap_m_points = [ "swap" ];
- global list<string> tmp_m_mpoint = [ "/tmp", "/var/tmp" ];
+
+ global const list<string> system_m_points = [ "/", "/usr", "/var", "/opt", Partitions::BootMount() ];
+ global const list<string> crypt_m_points = [ "/", Partitions::BootMount(), "/usr" ];
+ global const list<string> swap_m_points = [ "swap" ];
+ global const list<string> tmp_m_points = [ "/tmp", "/var/tmp" ];
+
+ list<string> suggest_m_points = [];
+
global string nchars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
@@ -83,8 +85,9 @@
any sint = nil;
-define list FstabOptionStrings =
- [ "defaults",
+
+ const list<string> FstabOptionStrings = [
+ "defaults",
"auto", "noauto",
"atime", "noatime",
"ro", "rw",
@@ -103,16 +106,19 @@
"usrquota", "grpquota"
];
-define list FstabOptionRegex = [ "pri=[0-9]\+", "iocharset=.\+", "utf8=\.*",
+ const list<string> FstabOptionRegex = [
+ "pri=[0-9]\+", "iocharset=.\+", "utf8=\.*",
"nls=.\+", "codepage=.\+",
"gid=[0-9]\+", "umask=[0-7]\+",
"loop=.\+", "encryption=.\+",
"pri=[0-9]\+",
"locale=\.\+", "fmask=[0-7]\+", "dmask=[0-7]\+",
- "usrjquota=.\+", "grpjquota=.\+", "jqfmt=.\+" ];
+ "usrjquota=.\+", "grpjquota=.\+", "jqfmt=.\+"
+ ];
+
-define map FstabDefaultMap =
- $[ "pts": $[ "spec":"devpts", "mount":"/dev/pts", "vfstype":"devpts",
+ const map FstabDefaultMap = $[
+ "pts": $[ "spec":"devpts", "mount":"/dev/pts", "vfstype":"devpts",
"mntops":"mode=0620,gid=5", "freq":0, "passno":0 ],
"proc": $[ "spec":"proc", "mount":"/proc", "vfstype":"proc",
"mntops":"defaults", "freq":0, "passno":0 ],
@@ -1373,22 +1379,17 @@
return( ret );
}
-global define map GetFstabDefaultMap( string key )
- ``{
- return( FstabDefaultMap[key]:$[] );
- }
-global define string GetFstabDefaultMntops( string key )
- ``{
- map m = GetFstabDefaultMap( key );
- return( m["mntops"]:"" );
+ global map GetFstabDefaultMap(string key)
+ {
+ return FstabDefaultMap[key]:$[];
}
-global define list GetFstabDefaultList( string key )
- ``{
- map m = GetFstabDefaultMap( key );
- return( [ m["spec"]:"", m["mount"]:"", m["vfstype"]:"", m["mntops"]:"",
- tostring(m["freq"]:0), tostring(m["passno"]:0) ] );
+ global list<string> GetFstabDefaultList(string key)
+ {
+ map m = GetFstabDefaultMap(key);
+ return [ m["spec"]:"", m["mount"]:"", m["vfstype"]:"", m["mntops"]:"",
+ tostring(m["freq"]:0), tostring(m["passno"]:0) ];
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/storage/src/modules/Storage.ycp new/yast2-storage-2.18.18/storage/src/modules/Storage.ycp
--- old/yast2-storage-2.18.18/storage/src/modules/Storage.ycp 2009-08-11 13:35:57.000000000 +0200
+++ new/yast2-storage-2.18.18/storage/src/modules/Storage.ycp 2009-08-28 17:10:15.000000000 +0200
@@ -19,7 +19,7 @@
* wurde versucht "intelligent" zu gestallten und ist im einzelen bei den
* entspechenden Funktionen n�her erkl�rt.
*
- * $Id: Storage.ycp 58317 2009-08-11 11:35:58Z aschnell $
+ * $Id: Storage.ycp 58444 2009-08-27 13:53:51Z aschnell $
*/
{
module "Storage";
@@ -770,7 +770,7 @@
* Get List of swap partitions
* @return list List of swap partitions
*/
-global list SwappingPartitions()
+global list<string> SwappingPartitions()
{
SCR::UnmountAgent(.proc.swaps);
list<map> swaps = (list<map>) SCR::Read(.proc.swaps);
@@ -779,48 +779,12 @@
swaps = [];
}
swaps = filter(map e, swaps, ``(e["type"]:""=="partition"));
- list ret = maplist(map e, swaps, ``(Partitions::TranslateMapperName(e["file"]:"")));
+ list<string> ret = maplist(map e, swaps, ``(Partitions::TranslateMapperName(e["file"]:"")));
y2milestone("SwappingPartitions %1", ret);
return ret;
}
-list<string> GetDestroyedLvmVgs(map target)
-{
- list<string> vgs = [];
- foreach(string diskdev, map disk, target, {
- foreach( map p, disk["partitions"]:[], {
- if( p["used_by_type"]:`UB_NONE==`UB_LVM && p["format"]:false )
- {
- vgs = add(vgs, p["used_by_device"]:"");
- }
- });
- });
- vgs = toset(vgs);
- y2milestone( "GetDestroyedLvmVgs %1", vgs );
- return vgs;
-}
-
-
-global map DeleteDestroyedLvmVgs(map target)
-{
- list<string> vgs = GetDestroyedLvmVgs(target);
- y2milestone( "DeleteDestroyedLvmVgs %1", vgs );
- foreach(string dev, vgs, {
- if( haskey( target, dev ))
- target[dev,"delete"] = true;
- target[dev,"partitions"] = maplist( map p, target[dev,"partitions"]:[],
- ``{
- if( haskey( p, "mount" ))
- p = remove( p, "mount" );
- return( p );
- });
- y2milestone( "DeleteDestroyedLvmVgs %1: %2", dev, target[dev]:$[] );
- });
- return target;
-}
-
-
/**
* Returns map of free space per partition
*
@@ -994,12 +958,14 @@
return( targets );
};
-global define string SaveDumpPath( string name )``{
- string ret = Directory::tmpdir + "/" + name;
- y2debug( "name=%1 path=%2", name, ret );
- return ret;
+
+ global string SaveDumpPath(string name)
+ {
+ string ret = Directory::tmpdir + "/" + name;
+ return ret;
}
+
// add mount point for all mounted partitions
/**
* Adds mountpoint info to the target map and returns the changed map
@@ -1765,7 +1731,7 @@
* @param map disk
* @return map disk info
*/
-global define map getDiskInfo( string device, map disk )
+ map getDiskInfo(string device, map disk)
{
map c = $[];
c = find( map p, conts, ``(p["device"]:""==device ));
@@ -1806,9 +1772,9 @@
*
* @return map
*/
-global define map< string, map > GetOndiskTarget()
+ global map GetOndiskTarget()
{
- list keys = [ "mount", "enc_type", "mountby", "fstopt", "used_fs", "format" ];
+ list<string> keys = [ "mount", "enc_type", "mountby", "fstopt", "used_fs", "format" ];
map ret = GetTargetMap();
foreach( string d, map disk, ret,
``{
@@ -1823,9 +1789,10 @@
}));
ret[d,"partitions"] = pl;
});
- return( ret );
+ return ret;
}
+
global define void CreateTargetBackup(string who)
{
string t = "targetMap_s_" + who + "_" + sformat("%1",count);
@@ -1960,11 +1927,9 @@
}
-// Constructor
-global define void Storage()
- ``{
- map m = (map)SCR::Execute(.target.bash_output, "date +%s.%N" );
- y2milestone( "constructor Storage() time:%1", m["stdout"]:"" );
+ // Storage Constructor
+ global void Storage()
+ {
if( Mode::normal() )
{
Storage::SetPartMode( "CUSTOM" );
@@ -1982,8 +1947,6 @@
Storage::SetPartMode( "CUSTOM" );
Storage::SetPartProposalActive( false );
}
- m = (map)SCR::Execute(.target.bash_output, "date +%s.%N" );
- y2milestone( "constructor Storage() end time:%1", m["stdout"]:"" );
}
@@ -3519,7 +3482,7 @@
size(p["device"]:"")>0 )
{
boolean mount_ok = false;
- string tmpdir = (string)SCR::Read(.target.tmpdir) + "/hmp";
+ string tmpdir = (string) SCR::Read(.target.tmpdir) + "/tmp-home-mp";
SCR::Execute(.target.mkdir, tmpdir );
string fsto = FileSystems::DefaultFstabOptions( p );
mount_ok = Storage::MountOpt( p["device"]:"", tmpdir, fsto );
@@ -4830,15 +4793,16 @@
}
}
+
global void FinishInstall()
{
y2milestone("FinishInstall initial:%1", Stage::initial());
- map tg = GetTargetMap();
+ map target_map = GetTargetMap();
if( Stage::initial() )
{
- HandleModulesOnBoot( tg );
+ HandleModulesOnBoot(target_map);
}
boolean need_crypt = false;
@@ -4847,11 +4811,10 @@
boolean need_dmraid = false;
boolean need_dmmultipath = false;
- foreach( string k, map e, tg, {
- if( size(filter( map p, e["partitions"]:[],
- ``(p["enc_type"]:`none != `none)))>0 )
+ foreach (string k, map e, target_map, {
+ if (find(map part, e["partitions"]:[], { return part["enc_type"]:`none != `none; }) != nil)
need_crypt = true;
- if( e["type"]:`CT_UNKNOWN==`CT_MD && size(e["partitions"]:[])>0 )
+ if (e["type"]:`CT_UNKNOWN == `CT_MD && !isempty(e["partitions"]:[]))
need_md = true;
if( e["type"]:`CT_UNKNOWN==`CT_LVM )
need_lvm = true;
@@ -4875,22 +4838,20 @@
y2milestone("FinishInstall done");
}
-global define map GetEntryForMountpoint( string mp )
- ``{
- list<map> all_partitions = [];
- foreach( string dev, map disk, GetTargetMap(),
- ``{
- all_partitions = (list<map>)union( all_partitions,
- disk["partitions"]:[] );
+
+ global map GetEntryForMountpoint(string mp)
+ {
+ list<map> partitions = [];
+
+ foreach(string dev, map disk, GetTargetMap(), {
+ list<map> tmp = filter(map part, disk["partitions"]:[], { return part["mount"]:"" == mp; });
+ partitions = (list<map>) union(partitions, tmp);
});
- map partition = find( map part, all_partitions, ``(part["mount"]:""==mp) );
- if( partition==nil || partition["mount"]:"" != mp )
- {
- partition = $[];
- }
- return partition;
+
+ return partitions[0]:$[];
}
+
global define list GetRootInitrdModules()
``{
map partition = GetEntryForMountpoint( "/" );
@@ -4970,36 +4931,24 @@
return initrdmodules;
};
-/**
- * CheckForLvmRootFs
- *---------------------------------------------------------------------
- * check if the root filesystem is a lvm logical volume
- *
- **/
-global define boolean CheckForLvmRootFs()
- ``{
- map part = GetEntryForMountpoint( "/" );
- y2milestone( "CheckForLvmRootFs root=%1", part );
- boolean ret = part["type"]:`primary==`lvm;
- y2milestone( "CheckForLvmRootFs ret=%1", ret );
- return ret;
- };
+ global boolean CheckForLvmRootFs()
+ {
+ map part = GetEntryForMountpoint("/");
+ boolean ret = part["type"]:`primary == `lvm;
+ y2milestone("CheckForLvmRootFs root:%1 ret:%2", part, ret);
+ return ret;
+ }
+
+
+ global boolean CheckForMdRootFs()
+ {
+ map part = GetEntryForMountpoint("/");
+ boolean ret = part["type"]:`primary == `sw_raid;
+ y2milestone("CheckForMdRootFs root:%1 ret:%2", part, ret);
+ return ret;
+ }
- /*---------------------------------------------------------------------
- * checkForMdRootFs
- *---------------------------------------------------------------------
- * check if the root filesystem is a md device
- *---------------------------------------------------------------------
- */
-global define boolean CheckForMdRootFs()
- ``{
- map part = GetEntryForMountpoint( "/" );
- boolean ret = part["type"]:`primary==`sw_raid;
- y2milestone( "CheckForMdRootFs root=%1", part );
- y2milestone( "CheckForMdRootFs ret=%1", ret );
- return ret;
- };
global define void AdaptResize( string maindev, list region, integer schange )
``{
@@ -5177,9 +5126,9 @@
if( mount_point == "swap" )
{
vfstype = "swap";
- if( size(mntops) == 0 )
+ if (isempty(mntops))
{
- mntops = FileSystems::GetFstabDefaultMntops( "swap" );
+ mntops = FileSystems::GetFstabDefaultMap("swap")["mntops"]:"";
}
passno = 0;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-storage-2.18.18/storage/src/modules/StorageProposal.ycp new/yast2-storage-2.18.18/storage/src/modules/StorageProposal.ycp
--- old/yast2-storage-2.18.18/storage/src/modules/StorageProposal.ycp 2009-08-05 12:45:19.000000000 +0200
+++ new/yast2-storage-2.18.18/storage/src/modules/StorageProposal.ycp 2009-09-25 12:25:22.000000000 +0200
@@ -205,6 +205,42 @@
}
+ list<string> GetDestroyedLvmVgs(map target)
+ {
+ list<string> vgs = [];
+ foreach(string diskdev, map disk, target, {
+ foreach( map p, disk["partitions"]:[], {
+ if( p["used_by_type"]:`UB_NONE==`UB_LVM && p["format"]:false )
+ {
+ vgs = add(vgs, p["used_by_device"]:"");
+ }
+ });
+ });
+ vgs = toset(vgs);
+ y2milestone( "GetDestroyedLvmVgs %1", vgs );
+ return vgs;
+ }
+
+
+ map DeleteDestroyedLvmVgs(map target)
+ {
+ list<string> vgs = GetDestroyedLvmVgs(target);
+ y2milestone( "DeleteDestroyedLvmVgs %1", vgs );
+ foreach(string dev, vgs, {
+ if( haskey( target, dev ))
+ target[dev,"delete"] = true;
+ target[dev,"partitions"] = maplist( map p, target[dev,"partitions"]:[],
+ ``{
+ if( haskey( p, "mount" ))
+ p = remove( p, "mount" );
+ return( p );
+ });
+ y2milestone( "DeleteDestroyedLvmVgs %1: %2", dev, target[dev]:$[] );
+ });
+ return target;
+ }
+
+
list<string> NoProposeDisks()
{
if (no_propose_disks == nil)
@@ -253,7 +289,8 @@
{
boolean ret = !Storage::IsPartitionable( entry ) ||
entry["readonly"]:false || Arch::s390();
- if( !ret && (Partitions::EfiBoot() || Arch::ia64()) && entry["label"]:"gpt"!="gpt" )
+ // GPT is not required for uEFI on x86_64
+ if( !ret && Arch::ia64() && entry["label"]:"gpt"!="gpt" )
{
ret = true;
}
@@ -848,7 +885,7 @@
});
ret["ok"] = true;
target = Storage::SpecialBootHandling( target );
- ret["target"] = Storage::DeleteDestroyedLvmVgs( target );
+ ret["target"] = DeleteDestroyedLvmVgs(target);
}
}
return( ret );
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org