[yast-commit] r62868 - in /trunk/installation: VERSION package/yast2-installation.changes src/clients/inst_prepareprogress.ycp src/modules/ImageInstallation.ycp
Author: jsrain Date: Thu Nov 18 16:16:55 2010 New Revision: 62868 URL: http://svn.opensuse.org/viewcvs/yast?rev=62868&view=rev Log: use df for estimating partition size for live installer (bnc#555288) Modified: trunk/installation/VERSION trunk/installation/package/yast2-installation.changes trunk/installation/src/clients/inst_prepareprogress.ycp trunk/installation/src/modules/ImageInstallation.ycp Modified: trunk/installation/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/VERSION?rev=62868&r1=62867&r2=62868&view=diff ============================================================================== --- trunk/installation/VERSION (original) +++ trunk/installation/VERSION Thu Nov 18 16:16:55 2010 @@ -1 +1 @@ -2.20.0 +2.20.1 Modified: trunk/installation/package/yast2-installation.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=62868&r1=62867&r2=62868&view=diff ============================================================================== --- trunk/installation/package/yast2-installation.changes (original) +++ trunk/installation/package/yast2-installation.changes Thu Nov 18 16:16:55 2010 @@ -1,8 +1,11 @@ ------------------------------------------------------------------- -Thu Nov 18 11:33:48 UTC 2010 - jsrain@suse.cz +Thu Nov 16 16:13:48 UTC 2010 - jsrain@suse.cz - fixed behavior of window closing in installation proposal (bnc#636980) +- use df for estimating partition size for live installer + (bnc#555288) +- 2.20.1 ------------------------------------------------------------------- Thu Sep 30 17:33:48 UTC 2010 - lslezak@suse.cz Modified: trunk/installation/src/clients/inst_prepareprogress.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_prepareprogress.ycp?rev=62868&r1=62867&r2=62868&view=diff ============================================================================== --- trunk/installation/src/clients/inst_prepareprogress.ycp (original) +++ trunk/installation/src/clients/inst_prepareprogress.ycp Thu Nov 18 16:16:55 2010 @@ -36,12 +36,25 @@ integer live_size = 0; if (Mode::live_installation()) { + + string cmd = sformat ("df -P -k %1", "/"); + y2milestone ("Executing %1", cmd); + map out = (map)SCR::Execute (.target.bash_output, cmd); + y2milestone ("Output: %1", out); + string total_str = out["stdout"]:""; + total_str = splitstring(total_str, "\n")[1]:""; + live_size = tointeger (filter (string s, splitstring (total_str, " "), {return s != "";})[2]:"0"); + +/* Using df-based progress estimation, is rather faster + may be less precise + see bnc#555288 string cmd = sformat ("du -x -B 1024 -s %1", "/"); y2milestone ("Executing %1", cmd); map out = (map)SCR::Execute (.target.bash_output, cmd); y2milestone ("Output: %1", out); string total_str = out["stdout"]:""; live_size = tointeger (total_str); +*/ if (live_size == 0) live_size = 1024*1024; // 1 GB is a good approximation } Modified: trunk/installation/src/modules/ImageInstallation.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/modules/ImageInstallation.ycp?rev=62868&r1=62867&r2=62868&view=diff ============================================================================== --- trunk/installation/src/modules/ImageInstallation.ycp (original) +++ trunk/installation/src/modules/ImageInstallation.ycp Thu Nov 18 16:16:55 2010 @@ -892,12 +892,24 @@ integer progress_start, integer progress_finish) { + string cmd = sformat ("df -P -k %1", from); + y2milestone ("Executing %1", cmd); + map out = (map)SCR::Execute (.target.bash_output, cmd); + y2milestone ("Output: %1", out); + string total_str = out["stdout"]:""; + total_str = splitstring(total_str, "\n")[1]:""; + integer total_mb = tointeger (filter (string s, splitstring (total_str, " "), {return s != "";})[2]:"0"); + +/* Using df-based progress estimation, is rather faster + may be less precise + see bnc#555288 string cmd = sformat ("du -x -B 1048576 -s %1", from); y2milestone ("Executing %1", cmd); map out = (map)SCR::Execute (.target.bash_output, cmd); y2milestone ("Output: %1", out); string total_str = out["stdout"]:""; integer total_mb = tointeger (total_str); +*/ if (total_mb == 0) total_mb = 1024*1024*1024; // should be big enough -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsrain@svn2.opensuse.org