Author: ug Date: Fri Apr 9 11:31:15 2010 New Revision: 61627 URL: http://svn.opensuse.org/viewcvs/yast?rev=61627&view=rev Log: reuse of a physical device for an LVM fixed (bnc#591601). 2.17.43 Modified: branches/SuSE-Code-11-SP1-Branch/autoinstallation/VERSION branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/modules/AutoinstLVM.ycp Modified: branches/SuSE-Code-11-SP1-Branch/autoinstallation/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/autoinstallation/VERSION?rev=61627&r1=61626&r2=61627&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/autoinstallation/VERSION (original) +++ branches/SuSE-Code-11-SP1-Branch/autoinstallation/VERSION Fri Apr 9 11:31:15 2010 @@ -1 +1 @@ -2.17.42 +2.17.43 Modified: branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes?rev=61627&r1=61626&r2=61627&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes (original) +++ branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes Fri Apr 9 11:31:15 2010 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri Apr 9 11:30:37 CEST 2010 - ug@suse.de + +- reuse of a physical device for an LVM fixed (bnc#591601) +- 2.17.43 + +------------------------------------------------------------------- Mon Mar 29 11:07:34 CEST 2010 - ug@suse.de - too much logging and regression of bnc#492746 Modified: branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/modules/AutoinstLVM.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/modules/AutoinstLVM.ycp?rev=61627&r1=61626&r2=61627&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/modules/AutoinstLVM.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/modules/AutoinstLVM.ycp Fri Apr 9 11:31:15 2010 @@ -83,7 +83,7 @@ /* 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 ) { + 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" ) ); @@ -236,8 +236,9 @@ y2milestone("Existing PVs: %1", new_pvs ); map atm = AutoinstStorage::AutoTargetMap; foreach(map pv, new_pvs, ``{ + boolean to_add = false; if (pv["create"]:false) { - boolean to_add = true; + to_add = true; // exclude partitions that are NOT supposed to be in the LVM foreach( map atm_vol, atm[pv["maindev"]:"","partitions"]:[], ``{ if( pv["nr"]:0 == atm_vol["partition_nr"]:-1 ) { @@ -247,10 +248,21 @@ } } }); - if( to_add ) { - y2milestone("addPhysicalVolume %1 , %2",pv["device"]:"", current_vg ); - addPhysicalVolume(targetMap, pv["device"]:"", current_vg ); - } + } else { + to_add = false; + // exclude partitions that are NOT supposed to be in the LVM + foreach( map atm_vol, atm[pv["maindev"]:"","partitions"]:[], ``{ + if( pv["nr"]:0 == atm_vol["partition_nr"]:-1 ) { + if( atm_vol["lvm_group"]:"" == current_vg ) { + y2milestone("add %1",atm_vol); + to_add = true; + } + } + }); + } + if( to_add ) { + y2milestone("addPhysicalVolume %1 , %2",pv["device"]:"", current_vg ); + addPhysicalVolume(targetMap, pv["device"]:"", current_vg ); } }); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org