Hello community, here is the log from the commit of package yast2-backup for openSUSE:Factory checked in at 2012-05-21 07:33:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-backup (Old) and /work/SRC/openSUSE:Factory/.yast2-backup.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-backup", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-backup/yast2-backup.changes 2012-03-30 14:20:57.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-backup.new/yast2-backup.changes 2012-05-21 07:33:36.000000000 +0200 @@ -1,0 +2,13 @@ +Thu May 3 16:07:13 CEST 2012 - [email protected] + +- UI refresh adapted also in searching for changed files belonging + to RPMs (BNC #756493). +- 2.22.2 + +------------------------------------------------------------------- +Mon Apr 16 13:43:20 CEST 2012 - [email protected] + +- UI refresh in searching for modified files optimized for faster + machines (and disks) (BNC #756493). + +------------------------------------------------------------------- Old: ---- yast2-backup-2.22.1.tar.bz2 New: ---- yast2-backup-2.22.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-backup.spec ++++++ --- /var/tmp/diff_new_pack.DX3eTn/_old 2012-05-21 07:33:41.000000000 +0200 +++ /var/tmp/diff_new_pack.DX3eTn/_new 2012-05-21 07:33:41.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-backup -Version: 2.22.1 +Version: 2.22.2 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -81,6 +81,7 @@ export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG" export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG" +%{?suse_update_config:%{suse_update_config -f}} ./configure --libdir=%{_libdir} --prefix=%{_prefix} --mandir=%{_mandir} # V=1: verbose build in case we used AM_SILENT_RULES(yes) # so that RPM_OPT_FLAGS check works ++++++ yast2-backup-2.22.1.tar.bz2 -> yast2-backup-2.22.2.tar.bz2 ++++++ ++++ 2092 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-backup-2.22.1/VERSION new/yast2-backup-2.22.2/VERSION --- old/yast2-backup-2.22.1/VERSION 2012-03-29 13:57:52.000000000 +0200 +++ new/yast2-backup-2.22.2/VERSION 2012-05-16 15:11:44.000000000 +0200 @@ -1 +1 @@ -2.22.1 +2.22.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-backup-2.22.1/configure.in new/yast2-backup-2.22.2/configure.in --- old/yast2-backup-2.22.1/configure.in 2012-03-29 13:57:57.000000000 +0200 +++ new/yast2-backup-2.22.2/configure.in 2012-05-16 15:12:05.000000000 +0200 @@ -1,9 +1,9 @@ dnl configure.in for yast2-backup dnl -dnl -- This file is generated by y2autoconf 2.21.8 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.21.6 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-backup, 2.22.1, http://bugs.opensuse.org/, yast2-backup) +AC_INIT(yast2-backup, 2.22.2, http://bugs.opensuse.org/, yast2-backup) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) dnl Important YaST2 variables -VERSION="2.22.1" +VERSION="2.22.2" RPMNAME="yast2-backup" MAINTAINER="Lukas Ocilka <[email protected]>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-backup-2.22.1/src/ui.ycp new/yast2-backup-2.22.2/src/ui.ycp --- old/yast2-backup-2.22.1/src/ui.ycp 2012-03-29 13:57:03.000000000 +0200 +++ new/yast2-backup-2.22.2/src/ui.ycp 2012-05-16 15:10:10.000000000 +0200 @@ -8,7 +8,7 @@ * Authors: * Ladislav Slezak <[email protected]> * - * $Id: ui.ycp 66446 2011-10-14 10:51:38Z locilka $ + * $Id: ui.ycp 68083 2012-05-03 14:10:46Z locilka $ * * Yast2 user interface functions - dialogs */ @@ -1739,6 +1739,9 @@ } } +integer ui_last_refresh = 0; +integer ui_time_now = 0; + define void Search_ChangedPackageFiles () { // store package's changed files if (size(package_files) > 0) { @@ -1759,7 +1762,17 @@ } package_num = package_num + 1; - if (!Backup::cron_mode) { + // Do not refresh UI in cron mode + if (Backup::cron_mode) + return; + + ui_time_now = time(); + + // BNC#756493: Refresh the UI max. once per second + // Otherwise it uses too much CPU on faster systems / disks + if (ui_time_now > ui_last_refresh) { + ui_last_refresh = ui_time_now; + UI::ChangeWidget(`id(`package), `Value, _("Searching in Package: ") + actual_package); UI::ChangeWidget(`id(`progress), `Value, package_num); // bug #172406 @@ -1769,7 +1782,27 @@ } /** - * not sure + * Updates UI: Modified files size and count + */ +define void Search_UpdateFilesAndSize (integer & modified_size, integer & modified_num) { + # There's no UI in cron mode + if (Backup::cron_mode) + return; + + ui_time_now = time(); + + if (ui_time_now > ui_last_refresh) { + ui_last_refresh = ui_time_now; + + UI::ChangeWidget(`id(`totsize), `Value, + _("Total Size: ") + String::FormatSize (modified_size)); + UI::ChangeWidget(`id(`numfiles), `Value, + _("Modified Files: ") + sformat ("%1", modified_num)); + } +} + +/** + * Updates UI while searching for modified files */ define void Search_ModifiedFiles () { line = substring(line, size(id_file)); @@ -1778,11 +1811,7 @@ modified_size = modified_size + tointeger(size_str); modified_num = modified_num + 1; - if (!Backup::cron_mode) - { - UI::ChangeWidget(`id(`totsize), `Value, _("Total Size: ") + sformat("%1", String::FormatSize(modified_size))); - UI::ChangeWidget(`id(`numfiles), `Value, _("Modified Files: ") + sformat("%1", modified_num)); - } + Search_UpdateFilesAndSize(modified_size, modified_num); string found_file = substring(line, findfirstof(line, " ") + 1); @@ -1837,7 +1866,7 @@ reading_installed_packages = true; } else { if (line == id_files_read) { - if (Backup::cron_mode != true) { + if (!Backup::cron_mode) { SetDialogContents_SearchingForModifiedFiles(total_packages); UI::RecalcLayout(); } @@ -2019,6 +2048,27 @@ return `next; } +integer dir_last_refresh = 0; +integer dir_time_now = 0; +string dir_shown = ""; + +define void Search_ShowCurrentDir (string & actual_dir) { + // No update + if (dir_shown == actual_dir) + return; + + dir_time_now = time(); + + if (dir_time_now > dir_last_refresh) { + UI::ChangeWidget(`id(`directory), `Value, _("Searching in Directory: ") + actual_dir); + dir_last_refresh = dir_time_now; + dir_shown = actual_dir; + + // BNC#172406: Cannot be used for ncurses + if (!in_ncurses) UI::RecalcLayout(); + } +} + /** * Display progress of searching modified files in packages * @return symbol Symbol for wizard sequencer - pressed button @@ -2072,6 +2122,7 @@ Search_ChangedPackageFiles(); } else { if (substring(line, 0, size(id_file)) == id_file) { + ui_last_refresh = 0; Search_ModifiedFiles(); } else { if (line == id_nopackage) { @@ -2123,19 +2174,27 @@ // searching files not belonging to any package if (search_no_package) { string actual_dir = "/"; + + # Strings are not localized on purpose: Used for matching output from + # the searching script string id_readingall = "Reading all files"; string id_readall = "Files read"; string id_dir = "Dir: "; + # Chached value + integer size_id_dir = size(id_dir); + if (!Backup::cron_mode) { SetDialogContents_SearchingFiles(); } - integer dircount = 0; + ui_last_refresh = 0; list package_files_part = []; integer new_files = 0; + string dir_shown = ""; + while ((boolean) SCR::Read (.process.running, backup_PID) || ! (boolean) SCR::Read (.process.buffer_empty, backup_PID)) // test of script_out size is needed, because previous while cycle was interrupted and script could exited with no new output... { @@ -2156,12 +2215,7 @@ nopkg_num = nopkg_num + 1; - // refresh status when 10 new files was found - it's faster... - if (nopkg_num % 10 == 0 && Backup::cron_mode != true) - { - UI::ChangeWidget(`id(`totsize), `Value, _("Total Size: ") + String::FormatSize(nopkg_size)); - UI::ChangeWidget(`id(`numfiles), `Value, _("Modified Files: ") + sformat("%1", nopkg_num)); - } + Search_UpdateFilesAndSize(modified_size, modified_num); string found_file = substring(line, findfirstof(line, " ") + 1); @@ -2179,35 +2233,20 @@ new_files = new_files + 1; // merge more files in one step - it's faster - if (new_files == 1000) - { + if (new_files == 1000) { package_files = merge(package_files, package_files_part); package_files_part = []; new_files = 0; } - } - else - { - if (substring(line, 0, size(id_dir)) == id_dir) - { - dircount = dircount + 1; - - if (dircount == 5) - { - actual_dir = substring(line, size(id_dir)); - - if (!Backup::cron_mode) - { - UI::ChangeWidget(`id(`directory), `Value, _("Searching in Directory: ") + actual_dir); - // bug #172406 - // Cannot be used for ncurses - if (!in_ncurses) UI::RecalcLayout(); - } - - dircount = 0; + } else { + if (!Backup::cron_mode) { + if (substring (line, 0, size_id_dir) == id_dir) { + actual_dir = substring(line, size_id_dir); } } } + + Search_ShowCurrentDir (actual_dir); // <--- script_out = []; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
