Author: aschnell
Date: Fri Mar 19 10:30:26 2010
New Revision: 61400
URL: http://svn.opensuse.org/viewcvs/yast?rev=61400&view=rev
Log:
- improved warning about unformatted home volume
Modified:
trunk/storage/package/yast2-storage.changes
trunk/storage/storage/src/modules/Storage.ycp
trunk/storage/storage/src/proposal/partitions_proposal.ycp
Modified: trunk/storage/package/yast2-storage.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=61400&r1=61399&r2=61400&view=diff
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Fri Mar 19 10:30:26 2010
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Fri Mar 19 10:23:49 CET 2010 - aschnell@suse.de
+
+- improved warning about unformatted home volume
+
+-------------------------------------------------------------------
Thu Mar 18 18:54:31 CET 2010 - fehr@suse.de
- make update and detection of encrypted LVM VGs possible
Modified: trunk/storage/storage/src/modules/Storage.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=61400&r1=61399&r2=61400&view=diff
==============================================================================
--- trunk/storage/storage/src/modules/Storage.ycp (original)
+++ trunk/storage/storage/src/modules/Storage.ycp Fri Mar 19 10:30:26 2010
@@ -805,8 +805,8 @@
}
-boolean GetFreeInfo(string device, boolean get_resize, map& resize_info,
- boolean get_content, map& content_info, boolean use_cache)
+global boolean GetFreeInfo(string device, boolean get_resize, map& resize_info,
+ boolean get_content, map& content_info, boolean use_cache)
{
resize_info = $[];
content_info = $[];
Modified: trunk/storage/storage/src/proposal/partitions_proposal.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/proposal/partitions_proposal.ycp?rev=61400&r1=61399&r2=61400&view=diff
==============================================================================
--- trunk/storage/storage/src/proposal/partitions_proposal.ycp (original)
+++ trunk/storage/storage/src/proposal/partitions_proposal.ycp Fri Mar 19 10:30:26 2010
@@ -15,35 +15,49 @@
import "Arch";
import "Wizard";
import "Mode";
- import "Storage";
import "Sequencer";
+ import "Storage";
import "StorageProposal";
+
string func = (string) WFM::Args(0);
map param = (map) WFM::Args(1);
map ret = $[];
y2milestone( "func:%1 param:%2", func, param );
+
// check if /home partition keeps unformatted in order to warn for
- // possible incorrectly set file ownership (fate#306325)
- boolean home_not_formatted() {
- map tm = Storage::GetTargetMap();
- boolean ret = false;
- foreach (string disk, map info, tm, {
- list<map> partitions = info["partitions"]:[];
- foreach (map p, partitions, {
- if (p["mount"]:"" == "/home" && ! p["format"]:false)
- {
- y2milestone ("The /home partition will not be formatted.");
- ret = true;
- break;
- }
- });
- });
- return ret;
+ // possible incorrectly set file ownership (fate #306325)
+ boolean unformatted_home_warning()
+ {
+ map part = Storage::GetEntryForMountpoint("/home");
+ if (!isempty(part) && !part["format"]:false)
+ {
+ y2milestone("/home partition will not be formatted");
+
+ import "UsersSimple";
+ if (UsersSimple::AfterAuth() != "users")
+ {
+ y2milestone("non-local user authentication");
+ return true;
+ }
+
+ string device = part["device"]:"";
+ map resize_info = $[];
+ map content_info = $[];
+ if (Storage::GetFreeInfo(device, false, resize_info, true, content_info, true) &&
+ content_info[`homes]:0 > 1)
+ {
+ y2milestone("multiple home directories");
+ return true;
+ }
+ }
+
+ return false;
}
+
if( func == "MakeProposal" && Mode::autoinst() )
{
ret["preformatted_proposal"] = Storage::ChangeText();
@@ -84,17 +98,13 @@
!Storage::GetPartProposalActive() )
{
ret["preformatted_proposal"] = Storage::ChangeText();
- // detect non-formated /home together with remote authentication - Fate#306325
- if (home_not_formatted())
- {
- import "UsersSimple";
- if (UsersSimple::AfterAuth() != "users")
- {
- ret["warning"] = _("The /home partition will not be formatted. After installation,
-ensure that the permissions to home directories are set properly.");
- ret["warning_level"] = `warning;
- }
- }
+
+ if (unformatted_home_warning())
+ {
+ ret["warning"] = _("The /home partition will not be formatted. After installation,
+ensure that ownerships of home directories are set properly.");
+ ret["warning_level"] = `warning;
+ }
}
else
{
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org