[yast-commit] r66654 - in /trunk/packager: VERSION package/yast2-packager.changes src/modules/SpaceCalculation.ycp
Author: lslezak Date: Tue Nov 1 14:53:11 2011 New Revision: 66654 URL: http://svn.opensuse.org/viewcvs/yast?rev=66654&view=rev Log: - fixed free space check for very small partitions (~15MB), do not report insufficient disk space when there is actually nothing to install on it (bnc#724894) - 2.21.22 Modified: trunk/packager/VERSION trunk/packager/package/yast2-packager.changes trunk/packager/src/modules/SpaceCalculation.ycp Modified: trunk/packager/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/VERSION?rev=66654&r1=66653&r2=66654&view=diff ============================================================================== --- trunk/packager/VERSION (original) +++ trunk/packager/VERSION Tue Nov 1 14:53:11 2011 @@ -1 +1 @@ -2.21.21 +2.21.22 Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=66654&r1=66653&r2=66654&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Tue Nov 1 14:53:11 2011 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Tue Nov 1 13:21:19 UTC 2011 - lslezak@suse.cz + +- fixed free space check for very small partitions (~15MB), do not + report insufficient disk space when there is actually nothing + to install on it (bnc#724894) +- 2.21.22 + +------------------------------------------------------------------- Mon Oct 31 17:46:14 UTC 2011 - lslezak@suse.cz - copy the metadata cache after saving repository setup to not Modified: trunk/packager/src/modules/SpaceCalculation.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/modules/SpaceCalculation.ycp?rev=66654&r1=66653&r2=66654&view=diff ============================================================================== --- trunk/packager/src/modules/SpaceCalculation.ycp (original) +++ trunk/packager/src/modules/SpaceCalculation.ycp Tue Nov 1 14:53:11 2011 @@ -611,6 +611,13 @@ free_size = part["size_k"]:0 * 1024; free_size = free_size - min_spare; + // free_size smaller than min_spare, fix negative value + if (free_size < 0) + { + y2milestone("Fixing free size: %1 to 0", free_size); + free_size = 0; + } + integer used = 0; if (! (part["create"]:false || part["format"]:false)) { @@ -714,6 +721,13 @@ // decrease free size free_size = free_size - used; + + // check for underflow + if (free_size < 0) + { + y2milestone("Fixing free size: %1 to 0", free_size); + free_size = 0; + } } // convert into kB for TargetInitDU -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
lslezak@svn2.opensuse.org