Author: aschnell Date: Wed May 9 12:00:19 2012 New Revision: 68116 URL: http://svn.opensuse.org/viewcvs/yast?rev=68116&view=rev Log: - do not allow mount-by methods not available (bnc#758639) Modified: branches/SuSE-SLE-10-SP4-Branch/storage/package/yast2-storage.changes branches/SuSE-SLE-10-SP4-Branch/storage/storage/src/include/custom_part_dialogs.ycp branches/SuSE-SLE-10-SP4-Branch/storage/storage/src/inst_custom_part.ycp Modified: branches/SuSE-SLE-10-SP4-Branch/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/storage/package/yast2-storage.changes?rev=68116&r1=68115&r2=68116&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/storage/package/yast2-storage.changes (original) +++ branches/SuSE-SLE-10-SP4-Branch/storage/package/yast2-storage.changes Wed May 9 12:00:19 2012 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Thu May 03 16:52:12 CEST 2012 - aschnell@suse.de + +- do not allow mount-by methods not available (bnc#758639) + +------------------------------------------------------------------- Thu Sep 15 15:51:11 CEST 2011 - aschnell@suse.de - fixed used-by detection for DM devices used by LVM (bnc#718033) Modified: branches/SuSE-SLE-10-SP4-Branch/storage/storage/src/include/custom_part_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/storage/storage/src/include/custom_part_dialogs.ycp?rev=68116&r1=68115&r2=68116&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/storage/storage/src/include/custom_part_dialogs.ycp (original) +++ branches/SuSE-SLE-10-SP4-Branch/storage/storage/src/include/custom_part_dialogs.ycp Wed May 9 12:00:19 2012 @@ -647,20 +647,28 @@ { list no_mountby_type = [ `loop ]; list mountby_id_path_type = [ `primary, `logical ]; - symbol defmb = Storage::GetMountBy( new["device"]:"" ); + map enab = $[]; + boolean tmp = !contains( no_mountby_type, new["type"]:`primary ); + enab[`label] = tmp && FileSystems::MountLabel( new["used_fs"]:`unknown ) && + new["enc_type"]:`none==`none; + enab[`uuid] = tmp && (new["format"]:false || size(new["uuid"]:"")>0) && + FileSystems::MountUuid( new["used_fs"]:`unknown ) && + new["enc_type"]:`none==`none; + tmp = contains(mountby_id_path_type, new["type"]:`none); + enab[`id] = tmp && size(new["udev_id"]:[])>0; + enab[`path] = tmp && size(new["udev_path"]:"")>0; + y2milestone( "FstabOptions enab %1", enab ); + UI::ChangeWidget( `id(`label), `Enabled, enab[`label]:false ); + UI::ChangeWidget( `id(`uuid), `Enabled, enab[`uuid]:false ); + UI::ChangeWidget( `id(`id), `Enabled, enab[`id]:false ); + UI::ChangeWidget( `id(`path), `Enabled, enab[`path]:false ); + symbol defmb = !Mode::config() ? Storage::GetMountBy( new["device"]:"" ) + : `device; y2milestone( "FstabOptions defmb %1", defmb ); + if( haskey( enab, defmb ) && !enab[defmb]:false ) + defmb = `device; UI::ChangeWidget( `id(`mt_group), `CurrentButton, new["mountby"]:defmb ); - UI::ChangeWidget( `id(`label), `Enabled, - FileSystems::MountLabel( new["used_fs"]:`unknown ) && - new["enc_type"]:`none==`none && - !contains( no_mountby_type, new["type"]:`primary ) ); - UI::ChangeWidget( `id(`uuid), `Enabled, - (new["format"]:false || size(new["uuid"]:"")>0) && - FileSystems::MountUuid( new["used_fs"]:`unknown ) && - !contains( no_mountby_type, new["type"]:`primary ) ); - UI::ChangeWidget( `id(`id), `Enabled, contains(mountby_id_path_type, new["type"]:`none) ); - UI::ChangeWidget( `id(`path), `Enabled, contains(mountby_id_path_type, new["type"]:`none) ); } if( UI::WidgetExists( `id(`vol_label) )) Modified: branches/SuSE-SLE-10-SP4-Branch/storage/storage/src/inst_custom_part.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP4-Branch/storage/storage/src/inst_custom_part.ycp?rev=68116&r1=68115&r2=68116&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP4-Branch/storage/storage/src/inst_custom_part.ycp (original) +++ branches/SuSE-SLE-10-SP4-Branch/storage/storage/src/inst_custom_part.ycp Wed May 9 12:00:19 2012 @@ -2889,6 +2889,18 @@ new_val["mount" ] = ""; } + if (haskey(disk, "udev_id")) + { + new_val["udev_id"] = maplist(string s, disk["udev_id"]:[], { + return sformat("%1-part%2", s, curr_nr); + }); + } + + if (haskey(disk, "udev_path")) + { + new_val["udev_path"] = sformat("%1-part%2", disk["udev_path"]:"", curr_nr); + } + new_val = EditOrCreatePartDlg( new_val, FileSystems::GetAllFileSystems(true, true ), titleC, disk, -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org