[yast-commit] r52587 - in /trunk/packager: package/yast2-packager.changes src/clients/inst_sw_select.ycp src/modules/Packages.ycp
![](https://seccdn.libravatar.org/avatar/2e1a2d7374f0eeb790839676bdd1123a.jpg?s=120&d=mm&r=g)
Author: locilka Date: Mon Oct 27 14:17:35 2008 New Revision: 52587 URL: http://svn.opensuse.org/viewcvs/yast?rev=52587&view=rev Log: - Reporting an error if software proposal cache is invalid (bnc #436925). Modified: trunk/packager/package/yast2-packager.changes trunk/packager/src/clients/inst_sw_select.ycp trunk/packager/src/modules/Packages.ycp Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=52587&r1=52586&r2=52587&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Mon Oct 27 14:17:35 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Oct 27 14:04:11 CET 2008 - locilka@suse.cz + +- Reporting an error if software proposal cache is invalid + (bnc #436925). + +------------------------------------------------------------------- Thu Oct 23 06:01:53 CEST 2008 - lslezak@suse.cz - properly select kernel packages (bnc#437258) Modified: trunk/packager/src/clients/inst_sw_select.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/inst_sw_select.ycp?rev=52587&r1=52586&r2=52587&view=diff ============================================================================== --- trunk/packager/src/clients/inst_sw_select.ycp (original) +++ trunk/packager/src/clients/inst_sw_select.ycp Mon Oct 27 14:17:35 2008 @@ -36,6 +36,10 @@ if ( ret == `accept ) { + // Package proposal cache has to be reset and recreated + // from scratch. See BNC #436925. + Packages::ResetProposalCache(); + Packages::base_selection_modified = true; ret = `next; Packages::solve_errors = 0; // all have been either solved Modified: trunk/packager/src/modules/Packages.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/modules/Packages.ycp?rev=52587&r1=52586&r2=52587&view=diff ============================================================================== --- trunk/packager/src/modules/Packages.ycp (original) +++ trunk/packager/src/modules/Packages.ycp Mon Oct 27 14:17:35 2008 @@ -66,13 +66,15 @@ // cache for the proposed summary map cached_proposal = nil; + // the selection used for the cached proposal -list<string> cached_proposal_packages = []; -list<map> cached_proposal_patterns = []; -list<map> cached_proposal_products = []; -list<map> cached_proposal_patches = []; -list<map> cached_proposal_selections = []; -list<string> cached_proposal_languages = []; +// the default values 'nil' say that the proposal hasn't been called yet +list <string> cached_proposal_packages = nil; +list <map> cached_proposal_patterns = nil; +list <map> cached_proposal_products = nil; +list <map> cached_proposal_patches = nil; +list <map> cached_proposal_selections = nil; +list <string> cached_proposal_languages = nil; global boolean install_sources = false; // Installing source packages ? global integer timestamp = 0; // last time of getting the target map @@ -117,6 +119,17 @@ // summary functions +global void ResetProposalCache () { + y2milestone ("Reseting the software proposal cache"); + + cached_proposal_packages = nil; + cached_proposal_patterns = nil; + cached_proposal_products = nil; + cached_proposal_patches = nil; + cached_proposal_selections = nil; + cached_proposal_languages = nil; +} + /** * List selected resolvables of specified kind * @param what symbol specifying the kind of resolvables to select @@ -1612,6 +1625,10 @@ full_repropose = false; } + if (force_reset) { + ResetProposalCache(); + } + // if the cache is valid and reset or reinitialization is not required // then the cached proposal can be used if (cached_proposal != nil && force_reset == false && reinit == false) @@ -1643,9 +1660,19 @@ y2milestone("using cached software proposal"); return cached_proposal; } - else - { - y2milestone("invalid cache: the software selection has been chaged"); + // do not show the error message during the first proposal + // (and the only way to change to software selection manually -> software_proposal/AskUser) + // + // 'nil' is the default value + // See also ResetProposalCache() + else if (cached_proposal_packages != nil && cached_proposal_patterns != nil + && cached_proposal_products != nil && cached_proposal_patches != nil + && cached_proposal_selections != nil && cached_proposal_languages != nil) + { + y2error("invalid cache: the software selection has been chaged"); + // bnc #436925 + Report::Error (_("The software selection has been changed externally. +Software proposal will be called again.")); } } else -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
locilka@svn.opensuse.org