[yast-commit] r63996 - in /branches/SuSE-Code-11-SP2-Branch/autoinstallation: package/autoyast2.changes src/modules/AutoinstLVM.ycp
Author: ug Date: Fri May 13 14:24:30 2011 New Revision: 63996 URL: http://svn.opensuse.org/viewcvs/yast?rev=63996&view=rev Log: keep_unknown_lv added (fate#308893) Modified: branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes branches/SuSE-Code-11-SP2-Branch/autoinstallation/src/modules/AutoinstLVM.ycp Modified: branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes?rev=63996&r1=63995&r2=63996&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes (original) +++ branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes Fri May 13 14:24:30 2011 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri May 13 14:24:10 CEST 2011 - ug@suse.de + +- keep_unknown_lv added (fate#308893) + +------------------------------------------------------------------- Tue Apr 26 10:14:58 CEST 2011 - ug@suse.de - try to mount DVD/CD again if first mount fails Modified: branches/SuSE-Code-11-SP2-Branch/autoinstallation/src/modules/AutoinstLVM.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/autoinstallation/src/modules/AutoinstLVM.ycp?rev=63996&r1=63995&r2=63996&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/autoinstallation/src/modules/AutoinstLVM.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/autoinstallation/src/modules/AutoinstLVM.ycp Fri May 13 14:24:30 2011 @@ -80,17 +80,29 @@ return (substring(d, 5) ); }); + /* we say keep all LVs where the keep_unknown_lv is set */ + foreach ( string k, map v, ExistingLVM, ``{ + string vgname = v["name"]:""; + foreach( map p, v["partitions"]:[], ``{ + if( lvm["/dev/"+vgname,"keep_unknown_lv"]:false == true ) + keepLVM[vgname] = add( keepLVM[vgname]:[], p["lv_name"]:"" ); + }); + }); + /* look for VGs to reuse */ foreach ( string k, map v, AutoinstStorage::AutoTargetMap, ``{ foreach ( map p, v["partitions"]:[], ``{ if( haskey( p, "lvm_group" ) && p["create"]:true == false && p["format"]:true == false ) { - keepLVM[p["lvm_group"]:"x"] = []; if( !contains( ExistingVGs, p["lvm_group"]:"x" ) ) Report::Error( sformat( _("Cannot reuse volume group %1. The volume group does not exist."), p["lvm_group"]:"x" ) ); map atm = AutoinstStorage::AutoTargetMap; foreach ( map vg_p, atm["/dev/"+p["lvm_group"]:"x","partitions"]:[], ``{ - if( vg_p["create"]:true == false ) - keepLVM[p["lvm_group"]:"x"] = add( keepLVM[p["lvm_group"]:"x"]:[], vg_p["lv_name"]:"" ); + string lvm_group = p["lvm_group"]:"x"; + // we know the LV now. So remove it from the keep-list for now + keepLVM[lvm_group] = filter (string v, keepLVM[lvm_group]:[], { return ( v != vg_p["lv_name"]:"" ); }); + if( vg_p["create"]:true == false && !contains(keepLVM[lvm_group]:[], vg_p["lv_name"]:"") ) { + keepLVM[lvm_group] = add( keepLVM[lvm_group]:[], vg_p["lv_name"]:"" ); + } }); } }); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
ug@svn2.opensuse.org