[yast-commit] r62811 - in /trunk/packager: VERSION package/yast2-packager.changes src/modules/PackageSlideShow.ycp src/modules/SlideShowCallbacks.ycp
Author: lslezak Date: Wed Nov 10 18:55:53 2010 New Revision: 62811 URL: http://svn.opensuse.org/viewcvs/yast?rev=62811&view=rev Log: - update the number of the remaining packages when package installation is finished, display it at the beginning (bnc#473822) - reset the list of packages so the next run displays correct values (used when PKGMGR_ACTION_AT_EXIT == "summary") - 2.20.10 Modified: trunk/packager/VERSION trunk/packager/package/yast2-packager.changes trunk/packager/src/modules/PackageSlideShow.ycp trunk/packager/src/modules/SlideShowCallbacks.ycp Modified: trunk/packager/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/VERSION?rev=62811&r1=62810&r2=62811&view=diff ============================================================================== --- trunk/packager/VERSION (original) +++ trunk/packager/VERSION Wed Nov 10 18:55:53 2010 @@ -1 +1 @@ -2.20.9 +2.20.10 Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=62811&r1=62810&r2=62811&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Wed Nov 10 18:55:53 2010 @@ -1,4 +1,14 @@ ------------------------------------------------------------------- +Wed Nov 10 17:20:53 UTC 2010 - lslezak@suse.cz + +- update the number of the remaining packages when package + installation is finished, display it at the beginning + (bnc#473822) +- reset the list of packages so the next run displays correct + values (used when PKGMGR_ACTION_AT_EXIT == "summary") +- 2.20.10 + +------------------------------------------------------------------- Wed Nov 3 13:44:55 UTC 2010 - lslezak@suse.cz - don't reset package selection in dirinstall mode when target Modified: trunk/packager/src/modules/PackageSlideShow.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/modules/PackageSlideShow.ycp?rev=62811&r1=62810&r2=62811&view=diff ============================================================================== --- trunk/packager/src/modules/PackageSlideShow.ycp (original) +++ trunk/packager/src/modules/PackageSlideShow.ycp Wed Nov 10 18:55:53 2010 @@ -82,6 +82,10 @@ total_installed = 0; // avg_download_rate = 0; + installed_packages_list = []; + updated_packages_list = []; + removed_packages_list = []; + // temporary values current_provide_size = 0; current_install_size = 0; @@ -853,7 +857,7 @@ (TotalInstalledSize() * (100 - downloading_pct) / total_size_to_install); } - y2internal("Total package installation progress: %1%%", total_progress); + y2debug("Total package installation progress: %1%%", total_progress); SlideShow::StageProgress( total_progress, nil ); } @@ -1013,6 +1017,23 @@ SlideShow::SubProgress( pkg_percent, new_text ); } + global void DisplayGlobalProgress() + { + string rem_string = ""; + integer tot_rem_t = TotalRemainingTime(); + + rem_string = ( unit_is_seconds && bytes_per_second > 0 && tot_rem_t > 0) ? + sformat("%1 / %2", FormatRemainingSize(TotalRemainingSize()), FormatTimeShowOverflow(tot_rem_t)) + : FormatRemainingSize(TotalRemainingSize()); + + if (rem_string != "") + { + rem_string = rem_string + ", "; + } + + SlideShow::SetGlobalProgressLabel( SlideShow::CurrentStageDescription() + sformat(_(" (Remaining: %1%2 packages)"), rem_string, TotalRemainingPkgCount())); + } + global void DoneProvide( integer error, string reason, string name ) { if (error == 0) @@ -1090,6 +1111,9 @@ UpdateTotalProgress(false); + // Update global progress bar + DisplayGlobalProgress(); + if (updating) { updated_packages = updated_packages + 1; @@ -1191,13 +1215,7 @@ SlideShow::SubProgress( 0, msg ); // Update global progress bar - string rem_string = ""; - integer tot_rem_t = TotalRemainingTime(); - - rem_string = ( unit_is_seconds && bytes_per_second > 0 && tot_rem_t > 0) ? - sformat("%1 / %2", FormatRemainingSize(TotalRemainingSize()), FormatTimeShowOverflow(tot_rem_t)) - : FormatRemainingSize(TotalRemainingSize()); - SlideShow::SetGlobalProgressLabel( SlideShow::CurrentStageDescription() + sformat(_(" (Remaining: %1, %2 packages)"), rem_string, TotalRemainingPkgCount())); + DisplayGlobalProgress(); // // Update (user visible) installation log Modified: trunk/packager/src/modules/SlideShowCallbacks.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/modules/SlideShowCallbacks.ycp?rev=62811&r1=62810&r2=62811&view=diff ============================================================================== --- trunk/packager/src/modules/SlideShowCallbacks.ycp (original) +++ trunk/packager/src/modules/SlideShowCallbacks.ycp Wed Nov 10 18:55:53 2010 @@ -121,7 +121,7 @@ } if (SlideShow::GetUserAbort()) { - return "CANCEL"; + return "C"; } if (error != 0) { @@ -508,6 +508,9 @@ PackageSlideShow::SetCurrentCdNo( source, media ); PackageSlideShow::UpdateCurrentPackageProgress(0); PackageSlideShow::UpdateAllCdProgress(false); + + // display remaining packages + PackageSlideShow::DisplayGlobalProgress(); }; global string MediaChange (string error_code, string error, string url, string product, -- 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