Author: jsuchome Date: Tue Jun 5 09:09:55 2007 New Revision: 38275 URL: http://svn.opensuse.org/viewcvs/yast?rev=38275&view=rev Log: - when the package selector is skipped, check if there are not licenses to show (#279491) - 2.13.60 Modified: branches/SuSE-SLE-10-SP1-Branch/online-update/VERSION branches/SuSE-SLE-10-SP1-Branch/online-update/package/yast2-online-update.changes branches/SuSE-SLE-10-SP1-Branch/online-update/src/inst_you.ycp Modified: branches/SuSE-SLE-10-SP1-Branch/online-update/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/online-update/VERSION?rev=38275&r1=38274&r2=38275&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP1-Branch/online-update/VERSION (original) +++ branches/SuSE-SLE-10-SP1-Branch/online-update/VERSION Tue Jun 5 09:09:55 2007 @@ -1 +1 @@ -2.13.59 +2.13.60 Modified: branches/SuSE-SLE-10-SP1-Branch/online-update/package/yast2-online-update.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/online-update/package/yast2-online-update.changes?rev=38275&r1=38274&r2=38275&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP1-Branch/online-update/package/yast2-online-update.changes (original) +++ branches/SuSE-SLE-10-SP1-Branch/online-update/package/yast2-online-update.changes Tue Jun 5 09:09:55 2007 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu May 31 21:03:08 CEST 2007 - jsuchome@suse.cz + +- when the package selector is skipped, check if there are not + licenses to show (#279491) +- 2.13.60 + +------------------------------------------------------------------- Fri May 11 12:21:00 CEST 2007 - jsuchome@suse.cz - added support for simplified UI (#273619) Modified: branches/SuSE-SLE-10-SP1-Branch/online-update/src/inst_you.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/online-update/src/inst_you.ycp?rev=38275&r1=38274&r2=38275&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP1-Branch/online-update/src/inst_you.ycp (original) +++ branches/SuSE-SLE-10-SP1-Branch/online-update/src/inst_you.ycp Tue Jun 5 09:09:55 2007 @@ -11,6 +11,7 @@ import "FileUtils"; import "GetInstArgs"; import "Internet"; + import "Label"; import "Mode"; import "OnlineUpdate"; import "OnlineUpdateCallbacks"; @@ -114,6 +115,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)) @@ -157,6 +160,10 @@ return `next; } } + else if (selected > 0) + { + check_licenses = true; + } list<string> normal_patches = []; boolean reboot_needed = false; @@ -206,7 +213,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