Hello community, here is the log from the commit of package yast2-online-update checked in at Tue May 6 01:36:10 CEST 2008. -------- --- yast2-online-update/yast2-online-update.changes 2008-04-30 09:32:48.000000000 +0200 +++ /mounts/work_src_done/NOARCH/yast2-online-update/yast2-online-update.changes 2008-05-05 16:24:58.556718000 +0200 @@ -1,0 +2,7 @@ +Mon May 5 15:46:48 CEST 2008 - jsuchome@suse.cz + +- added warning about the patch selection also to inst_you +- solver needs to be run before preselecting patches (bnc#385216) +- 2.16.14 + +------------------------------------------------------------------- Old: ---- yast2-online-update-2.16.13.tar.bz2 New: ---- yast2-online-update-2.16.14.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-online-update.spec ++++++ --- /var/tmp/diff_new_pack.gc3656/_old 2008-05-06 01:35:48.000000000 +0200 +++ /var/tmp/diff_new_pack.gc3656/_new 2008-05-06 01:35:48.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-online-update (Version 2.16.13) +# spec file for package yast2-online-update (Version 2.16.14) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -12,12 +12,12 @@ Name: yast2-online-update -Version: 2.16.13 +Version: 2.16.14 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-online-update-2.16.13.tar.bz2 +Source0: yast2-online-update-2.16.14.tar.bz2 Prefix: /usr BuildRequires: gcc-c++ libxcrypt-devel perl-XML-Writer pkg-config update-desktop-files yast2-bootloader yast2-devtools yast2-packager PreReq: grep sed @@ -50,7 +50,7 @@ gs@suse.de %prep -%setup -n yast2-online-update-2.16.13 +%setup -n yast2-online-update-2.16.14 %build %{prefix}/bin/y2tool y2autoconf @@ -152,8 +152,11 @@ %{prefix}/share/applications/YaST2/online_update.desktop /var/lib/YaST2/cd_update.desktop %ghost %{prefix}/share/applications/YaST2/cd_update.desktop - %changelog +* Mon May 05 2008 jsuchome@suse.cz +- added warning about the patch selection also to inst_you +- solver needs to be run before preselecting patches (bnc#385216) +- 2.16.14 * Thu Apr 24 2008 jsuchome@suse.cz - Patch CD: ensure first CD is in drive before synchronization with ZMD (bnc#381594) ++++++ yast2-online-update-2.16.13.tar.bz2 -> yast2-online-update-2.16.14.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-online-update-2.16.13/src/inst_you.ycp new/yast2-online-update-2.16.14/src/inst_you.ycp --- old/yast2-online-update-2.16.13/src/inst_you.ycp 2007-11-19 16:14:05.000000000 +0100 +++ new/yast2-online-update-2.16.14/src/inst_you.ycp 2008-05-05 16:17:59.000000000 +0200 @@ -84,7 +84,7 @@ // ping anything (www.suse.com) to trigger dod connections SCR::Execute (.target.bash_background, - "/bin/ping -c 1 -w 1 213.95.15.200"); + "/bin/ping -c 1 -w 1 195.135.220.3"); sleep (1000); i = i - 1; @@ -117,27 +117,24 @@ integer selected = 0; boolean check_licenses = false; + boolean reboot_needed = false; + boolean normal_patches_selected = false; - // check if there exists saved selection of patches to be installed + // check if YaST was restarted if (FileUtils::Exists (saved_path)) { - list<string> patches = (list<string>) SCR::Read(.target.ycp,saved_path); - if (patches == nil) - patches = []; - foreach (string pname, patches, { - if (Pkg::ResolvableInstall (pname, `patch)) - selected = selected + 1; - }); + string saved = (string) SCR::Read (.target.ycp, saved_path); + // saved value actually is not needed during installation + y2milestone ("previous action of YOU: %1", saved); SCR::Execute (.target.remove, saved_path); - y2milestone ("Previously selected patches: %1", selected); - } - // if not, select the patches affecting pkg management - else - { - selected = Pkg::ResolvablePreselectPatches (`affects_pkg_manager); - y2milestone ("Preselected patches for pkg management: %1", selected); } + boolean solved = Pkg::PkgSolve (false); + + // select the patches affecting pkg management + selected = Pkg::ResolvablePreselectPatches (`affects_pkg_manager); + y2milestone ("Preselected patches for pkg management: %1", selected); + // if no patch is selected, pre-select all security and recommended if (selected < 1) { @@ -146,27 +143,52 @@ } // run package selector to allow user interaction - if (!Pkg::PkgSolve (false) || + if (!solved || ProductFeatures::GetBooleanFeature("globals", "manual_online_update") || Hack ("ui")) { Pkg::TargetInitDU([]); // init DiskUsage counter (#197497) - UI::OpenDialog(`opt(`defaultsize), `PackageSelector(`id(`selector), `opt(`youMode)) ); - symbol ret_sel = (symbol)UI::RunPkgSelection(`id(`selector) ); - UI::CloseDialog(); - if (ret_sel == `cancel) + symbol ret_sel = nil; + repeat { - y2milestone ("package selector canceled -> `next"); - return `next; - } + UI::OpenDialog(`opt(`defaultsize), `PackageSelector(`id(`selector), `opt(`youMode)) ); + ret_sel = (symbol)UI::RunPkgSelection(`id(`selector) ); + if (ret_sel == `cancel) + { + y2milestone ("package selector canceled -> `next"); + UI::CloseDialog(); + return `next; + } + if (ret_sel == `accept) + { + boolean restart_yast = false; + normal_patches_selected = false; + foreach (map patch, Pkg::ResolvableProperties ("", `patch, ""), + { + if (patch["status"]:`none == `selected) + { + if (patch["affects_pkg_manager"]:false) + restart_yast = true; + else + normal_patches_selected = true; + } + }); + if (restart_yast && normal_patches_selected && + !Popup::ContinueCancel(OnlineUpdate::more_selected_message)) + { + // user wants to re-examine the selection + ret = nil; + } + } + UI::CloseDialog(); + } until (ret_sel == `cancel || ret_sel == `accept); } else if (selected > 0) { check_licenses = true; } - list<string> normal_patches = []; - boolean reboot_needed = false; + boolean more_patches_needed = false; foreach (map patch, Pkg::ResolvableProperties("", `patch, ""), { if (patch["status"]:`none == `selected) { @@ -178,34 +200,35 @@ else if (ret != `reboot) ret = `restart_same_step; } + else if (patch["reboot_needed"]:false) + { + // patch requiring reboot should be installed in this run + ret = `reboot; + } else { - normal_patches = add (normal_patches, patch["name"]:""); - // for this patch reboot would be needed, but still it is not - // clear if the patch will be installed in this run -> save info - if (patch["reboot_needed"]:false) - reboot_needed = true; + normal_patches_selected = true; } } + // patch not selected: touch saved_path to force the restart + else if (patch["is_needed"]:false) + { + y2milestone ("patch needed but not selected: %1", patch); + more_patches_needed = true; + } }); - // unselect non-affects_pkg_manager patches and save them to file - // for later usage - if (ret != `auto && size (normal_patches) > 0) + // tell the caller (/sbin/yast2) to call online update again + if (ret != `auto && more_patches_needed) { - foreach (string pname, normal_patches, { - Pkg::ResolvableNeutral (pname, `patch, true); - }); - SCR::Write (.target.ycp, saved_path, normal_patches); + string save_message = (ret == `reboot) ? "reboot" : "restart"; + SCR::Write (.target.ycp, saved_path, "inst_" + save_message); } - // no packagemanager patch selected ... + // no packagemanager/reboot patch selected ... if (ret == `auto) { - // ... but there is a patch with "reboot_needed" flag (=probably kernel) - if (reboot_needed) - ret = `reboot; // ... and nothing to install -> skip the installation at all - else if (normal_patches == [] && !Pkg::PkgAnyToInstall () && + if (!normal_patches_selected && !Pkg::PkgAnyToInstall () && !Pkg::PkgAnyToDelete ()) { y2milestone ("no patch selected after all -> `next"); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-online-update-2.16.13/src/online_update_select.ycp new/yast2-online-update-2.16.14/src/online_update_select.ycp --- old/yast2-online-update-2.16.13/src/online_update_select.ycp 2008-04-23 09:59:17.000000000 +0200 +++ new/yast2-online-update-2.16.14/src/online_update_select.ycp 2008-05-05 15:46:40.000000000 +0200 @@ -64,7 +64,9 @@ SCR::Execute (.target.remove, saved_path); } - // if not, select the patches affecting pkg management + Pkg::PkgSolve(true); + + // 1st, select the patches affecting pkg management selected = Pkg::ResolvablePreselectPatches (`affects_pkg_manager); y2milestone ("Preselected patches for pkg management: %1", selected); @@ -118,13 +120,7 @@ }); if (restart_yast && normal_patches_selected) { - // continue/cancel popup - if (!Popup::ContinueCancel (_("There are patches for package management available requiring restart of YaST. -They should be installed first and all other patches after the restart. - -You selected some other patches to be installed now. - -Continue with installing your selection?"))) + if (!Popup::ContinueCancel (OnlineUpdate::more_selected_message)) { ret = nil; UI::OpenDialog (`opt(`defaultsize), `PackageSelector(`id(`selector), `opt(`youMode))); @@ -169,7 +165,7 @@ // show reboot popup only when yast is not going to restart now reboot_needed = false; } - else + else if (restart_yast) { y2debug ("nothing left for the second run, no restart needed"); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-online-update-2.16.13/src/OnlineUpdate.ycp new/yast2-online-update-2.16.14/src/OnlineUpdate.ycp --- old/yast2-online-update-2.16.13/src/OnlineUpdate.ycp 2008-02-21 12:40:40.000000000 +0100 +++ new/yast2-online-update-2.16.14/src/OnlineUpdate.ycp 2008-05-02 12:33:32.000000000 +0200 @@ -32,6 +32,14 @@ global string reboot_message = _("At least one of the updates installed requires a system reboot to function properly. Reboot the system."); +// continue/cancel popup text +global string more_selected_message = _("There are patches for package management available requiring restart of YaST. +They should be installed first and all other patches after the restart. + +You selected some other patches to be installed now. + +Continue with installing your selection?"); + /** * If simple Package selector should be opened */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-online-update-2.16.13/VERSION new/yast2-online-update-2.16.14/VERSION --- old/yast2-online-update-2.16.13/VERSION 2008-04-30 09:21:59.000000000 +0200 +++ new/yast2-online-update-2.16.14/VERSION 2008-05-05 15:47:39.000000000 +0200 @@ -1 +1 @@ -2.16.13 +2.16.14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org