Author: jsuchome Date: Tue Jun 5 09:22:25 2007 New Revision: 38277 URL: http://svn.opensuse.org/viewcvs/yast?rev=38277&view=rev Log: - when the package selector is skipped, check if there are not licenses to show (#279491) - 2.15.16 Modified: trunk/online-update/VERSION trunk/online-update/package/yast2-online-update.changes trunk/online-update/src/inst_you.ycp Modified: trunk/online-update/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/online-update/VERSION?rev=38277&r1=38276&r2=38277&view=diff ============================================================================== --- trunk/online-update/VERSION (original) +++ trunk/online-update/VERSION Tue Jun 5 09:22:25 2007 @@ -1 +1 @@ -2.15.15 +2.15.16 Modified: trunk/online-update/package/yast2-online-update.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/online-update/package/yast2-online-update.changes?rev=38277&r1=38276&r2=38277&view=diff ============================================================================== --- trunk/online-update/package/yast2-online-update.changes (original) +++ trunk/online-update/package/yast2-online-update.changes Tue Jun 5 09:22:25 2007 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Jun 5 09:08:58 CEST 2007 - jsuchome@suse.cz + +- when the package selector is skipped, check if there are not + licenses to show (#279491) +- 2.15.16 + +------------------------------------------------------------------- Tue May 29 13:39:38 CEST 2007 - jsuchome@suse.cz - use zypper intseatd of rug for automatic online update (#273133) Modified: trunk/online-update/src/inst_you.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/online-update/src/inst_you.ycp?rev=38277&r1=38276&r2=38277&view=diff ============================================================================== --- trunk/online-update/src/inst_you.ycp (original) +++ trunk/online-update/src/inst_you.ycp Tue Jun 5 09:22:25 2007 @@ -11,6 +11,7 @@ import "FileUtils"; import "GetInstArgs"; import "Internet"; + import "Label"; import "Mode"; import "OnlineUpdate"; import "OnlineUpdateCallbacks"; @@ -120,6 +121,8 @@ } integer selected = 0; + boolean check_licenses = false; + list neutralized = []; // check if there exists saved selection of patches to be installed if (FileUtils::Exists (saved_path)) @@ -163,6 +166,10 @@ return `next; } } + else if (selected > 0) + { + check_licenses = true; + } list<string> normal_patches = []; boolean reboot_needed = false; @@ -212,7 +219,53 @@ } } - + // if the package selector was not opened, ask to confirm licenses + if (check_licenses) + { + foreach (string p, Pkg::GetPackages (`selected, true), { + string license = Pkg::PkgGetLicenseToConfirm (p); + if (license != nil && license != "") + { + string rt_license = sformat ("<p><b>%1</b></p>\n%2", p, license); + if (! Popup::AnyQuestionRichText ( + // popup heading, with rich text widget and Yes/No buttons + _("Do you accept this license agreement?"), + rt_license, + 70, 20, + Label::YesButton (), Label::NoButton (), + `focus_none)) + { + y2milestone("License not accepted: %1", p); + Pkg::ResolvableNeutral (p, `package, true); + neutralized = add (neutralized, p); + } + else + { + Pkg::PkgMarkLicenseConfirmed (p); + } + } + }); + if (neutralized != []) + { + // now, neutralize also the patches related to neutralized packages + foreach (map patch, Pkg::ResolvableDependencies ("", `patch, ""), { + if (patch["status"]:`none == `selected) + { + foreach (map dep, (list<map>)patch["dependencies"]:[], { + string kind = dep["res_kind"]:""; + string pname = dep["name"]:""; + pname = substring (pname, 0, findfirstof (pname, " ")); + if ((kind == "package" || kind == "atom") && + dep["dep_kind"]:"" == "requires" && + contains (neutralized, pname)) + { + Pkg::ResolvableNeutral (patch["name"]:"", `patch, true); + } + }); + } + }); + } + } // install the patches OnlineUpdateCallbacks::RegisterOnlineUpdateCallbacks(); WFM::call( "online_update_install" ); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org