[yast-commit] r60963 - in /branches/SuSE-Code-11-SP1-Branch/autoinstallation: package/autoyast2.changes src/include/autopart.ycp src/modules/AutoinstStorage.ycp
Author: ug Date: Tue Feb 23 09:08:37 2010 New Revision: 60963 URL: http://svn.opensuse.org/viewcvs/yast?rev=60963&view=rev Log: fix for resizing partitions (bnc#580842) Modified: branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/include/autopart.ycp branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/modules/AutoinstStorage.ycp 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=60963&r1=60962&r2=60963&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes (original) +++ branches/SuSE-Code-11-SP1-Branch/autoinstallation/package/autoyast2.changes Tue Feb 23 09:08:37 2010 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Tue Feb 23 09:08:00 CET 2010 - ug@suse.de + +- fix for resizing partitions (bnc#580842) + +------------------------------------------------------------------- Wed Jan 27 15:28:04 CET 2010 - ug@suse.de - symbol added for the use of ImsmDriver (bnc#574270) Modified: branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/include/autopart.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/include/autopart.ycp?rev=60963&r1=60962&r2=60963&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/include/autopart.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/include/autopart.ycp Tue Feb 23 09:08:37 2010 @@ -746,12 +746,24 @@ y2milestone( "requested partitions %1", ps ); y2milestone( "calculated gaps %1", g ); + ps = maplist( map partition, (list<map>)ps, ``{ + if( partition["resize"]:false ) { + // this is a cylinder correction for resized partitions + // bnc#580842 + partition["cylinders"] = partition["region",1]:0; + y2milestone("cylinder correction to %1", partition["cylinders"]:0); + } + return partition; + }); + foreach( map rp, (list<map>)ps, ``{ if( rp["resize"]:false ) { integer new_cyl_size = 0; integer cyl_size_change = 0; integer old_end = 0; + integer new_end = 0; g["gap"] = maplist( map gap, g["gap"]:[], ``{ + y2milestone("working on gap %1", gap); if( new_cyl_size != 0 ) { gap["cylinders"] = gap["cylinders"]:0 + cyl_size_change; gap["start"] = gap["start"]:0 - cyl_size_change; @@ -765,7 +777,10 @@ y2milestone("partition resize cyl_size_change=%1",cyl_size_change); gap["cylinders"] = new_cyl_size; - gap["size"] = gap["size"]:0 + cyl_size_change * g["cyl_size"]:0; + //gap["size"] = gap["size"]:0 + cyl_size_change * g["cyl_size"]:0; + gap["size"] = new_cyl_size * g["cyl_size"]:0; + gap["end"] = gap["start"]:0 + new_cyl_size - 1; + new_end = gap["end"]:0; y2milestone("changing gap to %1",gap); } return gap; @@ -773,9 +788,9 @@ if( new_cyl_size != 0 ) { map new_gap = $[]; new_gap["cylinders"] = cyl_size_change; - new_gap["size"] = cyl_size_change * g["cyl_size"]:0; - new_gap["start"] = old_end-cyl_size_change; + new_gap["start"] = new_end + 1; new_gap["end"] = old_end; + new_gap["size"] = new_gap["end"]:0 - new_gap["start"]:0 + 1; //FIXME: cyl_size? g["gap"] = add( g["gap"]:[], new_gap ); y2milestone("added new gap after shrinking %1", new_gap); } Modified: branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/modules/AutoinstStorage.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/modules/AutoinstStorage.ycp?rev=60963&r1=60962&r2=60963&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/modules/AutoinstStorage.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/autoinstallation/src/modules/AutoinstStorage.ycp Tue Feb 23 09:08:37 2010 @@ -323,7 +323,8 @@ if( device == "" ) { d["device"] = find_first_disk(last_dev); y2milestone("empty device in profile set to %1", d["device"]:""); - } else if( issubstring( device, "by-id" ) ) + } + else if( issubstring( device, "by-id" ) ) udev_string = "udev_id"; else if( issubstring( device, "by-path" ) ) udev_string = "udev_path"; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
ug@svn.opensuse.org