Hello community,
here is the log from the commit of package yast2-storage
checked in at Fri Sep 26 15:17:17 CEST 2008.
--------
--- yast2-storage/yast2-storage.changes 2008-09-23 17:49:29.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-storage/yast2-storage.changes 2008-09-26 13:49:49.062306000 +0200
@@ -1,0 +2,10 @@
+Fri Sep 26 13:16:42 CEST 2008 - kmachalkova@suse.cz
+
+- Suggest to format newly created partition by default (bnc#427604)
+- Propose reasonable mountpoints according to selected filesystem
+ (bnc#425741)
+- Correctly save filesystem ID (bnc#425744)
+- Few look&feel improvements
+- 2.17.33
+
+-------------------------------------------------------------------
Old:
----
yast2-storage-2.17.32.tar.bz2
New:
----
yast2-storage-2.17.33.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage.spec ++++++
--- /var/tmp/diff_new_pack.i11053/_old 2008-09-26 15:16:56.000000000 +0200
+++ /var/tmp/diff_new_pack.i11053/_new 2008-09-26 15:16:56.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-storage (Version 2.17.32)
+# spec file for package yast2-storage (Version 2.17.33)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-storage
-Version: 2.17.32
+Version: 2.17.33
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-storage-2.17.32.tar.bz2
+Source0: yast2-storage-2.17.33.tar.bz2
Prefix: /usr
BuildRequires: blocxx-devel boost-devel docbook-xsl-stylesheets doxygen gcc-c++ libxcrypt-devel libxslt openssl-devel perl-XML-Writer sablot sgml-skel swig update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-perl-bindings yast2-testsuite
Requires: parted yast2-storage-lib = %version yast2-perl-bindings mdadm lvm2 dmraid multipath-tools kpartx cryptsetup
@@ -58,7 +58,7 @@
Arvin Schnell
%prep
-%setup -n yast2-storage-2.17.32
+%setup -n yast2-storage-2.17.33
%build
%{prefix}/bin/y2tool y2autoconf
@@ -182,6 +182,13 @@
%doc %{prefix}/share/doc/packages/yast2-storage/libstorage
%doc %{prefix}/share/doc/packages/yast2-storage/config.xml.description
%changelog
+* Fri Sep 26 2008 kmachalkova@suse.cz
+- Suggest to format newly created partition by default (bnc#427604)
+- Propose reasonable mountpoints according to selected filesystem
+ (bnc#425741)
+- Correctly save filesystem ID (bnc#425744)
+- Few look&feel improvements
+- 2.17.33
* Tue Sep 23 2008 kmachalkova@suse.cz
- Use rpcbind as default portmapper in inst-sys. If not there, try
portmap instead (bnc#427428)
++++++ yast2-storage-2.17.32.tar.bz2 -> yast2-storage-2.17.33.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.17.32/storage/src/include/ep-dialogs.ycp new/yast2-storage-2.17.33/storage/src/include/ep-dialogs.ycp
--- old/yast2-storage-2.17.32/storage/src/include/ep-dialogs.ycp 2008-09-23 18:14:09.000000000 +0200
+++ new/yast2-storage-2.17.33/storage/src/include/ep-dialogs.ycp 2008-09-26 13:35:15.000000000 +0200
@@ -25,46 +25,85 @@
symbol MiniWorkflowStepFormatMount(map &orig_data)
{
map data = orig_data;
-
y2milestone("MiniWorkflowStepFormatMount data:%1", data);
+ //retrieve all filesystems
+ map > all_filesystems = FileSystems::GetAllFileSystems( true, true);
+
+ list <string> ProposeMountpoints( symbol used_fs, string current_mp )
+ {
+ map fs_data = all_filesystems[used_fs]: $[];
+
+ //not much choice for swap partitions :)
+ if( used_fs == `swap )
+ {
+ return fs_data[ `mountpoints ]:[];
+ }
+ //otherwise, ask notUsedMountPoint, it will filter out
+ //mountpoint already in use + add current mountpoint
+ else
+ {
+ list <string> not_used = notUsedMountpoints( Storage::GetTargetMap(), fs_data[ `mountpoints]:[]);
+ return ( list <string> ) union( [current_mp], not_used );
+ }
+ }
+
+
boolean do_format = data["format"]:false;
+ symbol used_fs = data["used_fs"]:`unknown;
boolean crypt_fs = data["enc_type"]:`none != `none;
string mount = data["mount"]:"";
boolean do_mount = mount != "";
+ /* MiniWorkflowStepPartitionSize data:
+ $["create":true,
+ "cyl_size":8225280,
+ "device":"/dev/sda1",
+ "disk_device":"/dev/sda",
+ "new":true,
+ "slots":$[`primary:[1, 65]],
+ "type":`primary]
+ */
+
+ //Supply some reasonable defaults for newly created partitions
+ //and mark it for formatting, too
if (data["new"]:false && !data["formatmount_proposed"]:false)
{
data["formatmount_proposed"] = true;
- string mount_point_proposal = GetMountPointProposal(Storage::GetTargetMap(), []);
+ //propose new mountpoint and filesystem
+ string mount_point_proposal = SingleMountPointProposal( );
+ used_fs = Partitions::DefaultFs();
- symbol used_fs = Partitions::DefaultFs();
+ //special case for boot partition
if (mount_point_proposal == Partitions::BootMount())
used_fs = Partitions::DefaultBootFs();
- // TODO
data["format"] = true;
data["fsid"] = Partitions::fsid_native;
+ data["used_fs"] = used_fs;
+
+ //set globals
+ do_format = true;
mount = mount_point_proposal;
do_mount = mount != "";
- data["used_fs"] = used_fs;
}
+
term tmp1 = `Empty();
if (contains([`primary, `extended, `logical], data["type"]:`none))
- tmp1 = `VBox(`id(`do_not_format_attachment), FsidComboBox(data, FileSystems::GetAllFileSystems(true, true)));
-
- list mountpoints = nil;
- if (mountpoints == nil)
- mountpoints = [ "/", "/usr", Partitions::BootMount(), "/var", "/home", "/opt" ];
+ {
+ tmp1 = `VBox(`id(`do_not_format_attachment),
+ FsidComboBox(data, FileSystems::GetAllFileSystems(true, true))
+ );
+ }
- if (mount != "" && !contains(mountpoints, mount))
- mountpoints = union([mount], mountpoints);
+ list mountpoints = ProposeMountpoints( used_fs, mount );
term contents = `HVSquash(`VStackFrames(
- `Frame(_("Format"),
+ `Frame(_("Formatting Options"),
`RadioButtonGroup(`id(`format),
+ `MarginBox(2.0, 0.5,
`VBox(
`LeftRadioButtonWithAttachment(`id(`do_format), `opt(`notify),
_("Format the partition"),
@@ -76,10 +115,12 @@
_("Do not format the partition"),
tmp1)
)
+ )
)
),
- `Frame(_("Mount"),
+ `Frame(_("Mounting Options"),
`RadioButtonGroup(`id(`mount),
+ `MarginBox(2.0, 0.5,
`VBox(
`LeftRadioButtonWithAttachment(`id(`do_mount), `opt(`notify),
_("Mount partition"),
@@ -95,6 +136,7 @@
`LeftRadioButton(`id(`do_not_mount), `opt(`notify),
_("Do not mount partition"))
)
+ )
)
)
)
@@ -120,15 +162,34 @@
switch (widget)
{
+ //user has chosen different filesystem
case `fs:
- symbol used_fs = (symbol) UI::QueryWidget(`id(`fs), `Value);
+ {
+ used_fs = (symbol) UI::QueryWidget(`id(`fs), `Value);
+
+ //retrieve info about fs user has selected
+ map used_fs_data = all_filesystems[used_fs]:$[];
+ y2milestone("Selected filesystem details %1", used_fs_data);
+
if (used_fs != data["used_fs"]:`none)
{
+ //set file system type
data["used_fs"] = used_fs;
data = filter(string key, any value, data, { return key != "fs_options"; });
+
+ //set file system ID (and update the File System ID widget
+ //that is - FsidComboBox)
+ data["fsid"] = used_fs_data[`fsid]: Partitions::fsid_native;
+ UI::ChangeWidget( `id(`fsid_point), `Value, used_fs_data[`fsid_item]:"");
+
+ //suggest some nice mountpoints if user wants to mount this partition
+ if (do_mount)
+ {
+ UI::ChangeWidget(`id(`mount_point), `Items, ProposeMountpoints( used_fs, mount ));
+ }
}
break;
-
+ }
case `crypt_fs:
MiniWorkflow::SetLastStep(UI::QueryWidget(`id(`crypt_fs), `Value) != true);
break;
@@ -170,10 +231,14 @@
break;
case `do_mount:
+ do_mount = true;
UI::ChangeWidget(`id(`do_mount_attachment), `Enabled, true);
+ //propose mountpoints
+ UI::ChangeWidget(`id(`mount_point), `Items, ProposeMountpoints( used_fs, mount ));
break;
case `do_not_mount:
+ do_mount = false;
UI::ChangeWidget(`id(`do_mount_attachment), `Enabled, false);
break;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.17.32/storage/src/include/ep-hd-dialogs.ycp new/yast2-storage-2.17.33/storage/src/include/ep-hd-dialogs.ycp
--- old/yast2-storage-2.17.32/storage/src/include/ep-hd-dialogs.ycp 2008-09-02 17:54:58.000000000 +0200
+++ new/yast2-storage-2.17.33/storage/src/include/ep-hd-dialogs.ycp 2008-09-26 13:35:30.000000000 +0200
@@ -40,8 +40,9 @@
tmp = add(tmp, `LeftRadioButton(`id(`logical), _("&Logical Partition"), type == `logical));
// heading for a frame in a dialog
- term contents = `HVSquash(`Frame(_("Partition Type"),
- `RadioButtonGroup(`id(`partition_type), tmp)));
+ term contents = `HVSquash(
+ `Frame(_("New Partition Type"),
+ `MarginBox(2.0, 0.5, `RadioButtonGroup(`id(`partition_type), tmp))));
MiniWorkflow::SetContents(Greasemonkey::Transform(contents), MiniWorkflowStepPartitionTypeHelptext());
MiniWorkflow::SetLastStep(false);
@@ -107,19 +108,21 @@
term contents = `HVSquash(
// frame heading
- `Frame(_("Size"),
+ `Frame(_("New Partition Size"),
`RadioButtonGroup(`id(`size),
+ `MarginBox(2.0, 0.5,
`VBox(
`LeftRadioButton(`id(`max_size), `opt(`notify),
// radio button text, %1 is replaced by size
sformat(_("Maximum Size (%1)"), Storage::KByteToHumanString(max_size_k))),
// radio button text
- `LeftRadioButtonWithAttachment(`id(`manual_size), `opt(`notify), _("Manual Size"),
+ `LeftRadioButtonWithAttachment(`id(`manual_size), `opt(`notify), _("Custom Size"),
`VBox(`id(`manual_size_attachment),
- `MinWidth(15, `InputField(`id(`size_input), `opt(`shrinkable), _("Size")))
+ `MinWidth(15, `InputField(`id(`size_input), `opt(`shrinkable), _("Size (e.g. 9.0 MB or 9.0 GB)")))
)
)
)
+ )
)));
MiniWorkflow::SetContents(Greasemonkey::Transform(contents), MiniWorkflowStepPartitionSizeHelptext());
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.17.32/storage/src/include/partition_defines.ycp new/yast2-storage-2.17.33/storage/src/include/partition_defines.ycp
--- old/yast2-storage-2.17.32/storage/src/include/partition_defines.ycp 2008-08-14 16:59:33.000000000 +0200
+++ new/yast2-storage-2.17.33/storage/src/include/partition_defines.ycp 2008-09-25 20:07:13.000000000 +0200
@@ -12,7 +12,7 @@
* mike
*
*
- * $Id: partition_defines.ycp 49683 2008-08-05 09:28:37Z aschnell $
+ * $Id: partition_defines.ycp 51555 2008-09-25 17:41:28Z kmachalkova $
*
*/
@@ -215,35 +215,18 @@
/**
- * Make a proposal for a Mountpoint
- * @parm targetMap all targets
- * @return string next mountpoint
+ * Make a proposal for a single mountpoint
+ * (first free on the list in installation,
+ * empty string otherwise)
**/
-define string GetMountPointProposal( map targetMap,
- list not_supported_mount_points )
- ``{
- list<string> base = FileSystems::SuggestMPoints();
- base = filter( string mount_point, base,
- ``( !contains( not_supported_mount_points, mount_point )));
- list free_list = filter( string point, base,
- ``{
- boolean found = false;
-
- foreach(string dev, map disk, targetMap,
- ``{
- map parti = (map) find(map part, disk["partitions"]:[],
- ``( part["mount"]:"" == point ));
- if (parti != nil)
- {
- found = true;
- }
- });
-
- return( !found );
- });
-
- return( Mode::normal()?"":(free_list[0]:"") );
- };
-
-
+define string SingleMountPointProposal( )
+``{
+ if ( Mode::normal() )
+ return "";
+ else
+ {
+ list free_list = notUsedMountpoints( Storage::GetTargetMap(), FileSystems::SuggestMPoints() ); // = filter( string point, base,
+ return free_list[0]:"";
+ }
+ }
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.17.32/VERSION new/yast2-storage-2.17.33/VERSION
--- old/yast2-storage-2.17.32/VERSION 2008-09-23 14:28:34.000000000 +0200
+++ new/yast2-storage-2.17.33/VERSION 2008-09-26 13:55:28.000000000 +0200
@@ -1 +1 @@
-2.17.32
+2.17.33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org