Author: jdsn Date: Thu Nov 20 17:35:41 2008 New Revision: 53494 URL: http://svn.opensuse.org/viewcvs/yast?rev=53494&view=rev Log: finish sources when changed to enforce reload (bnc#447080) merge service repo flags instead overwriting them Modified: trunk/registration/package/yast2-registration.changes trunk/registration/src/modules/Register.ycp Modified: trunk/registration/package/yast2-registration.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/package/yast2-registration.changes?rev=53494&r1=53493&r2=53494&view=diff ============================================================================== --- trunk/registration/package/yast2-registration.changes (original) +++ trunk/registration/package/yast2-registration.changes Thu Nov 20 17:35:41 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Nov 20 17:33:30 CET 2008 - jdsn@suse.de + +- finish sources when changed to enforce reload (bnc#447080) +- merge service repo flags instead overwriting them + +------------------------------------------------------------------- Fri Nov 14 17:55:56 CET 2008 - jdsn@suse.de - fix repo type definition for adding sources (bnc#444770) Modified: trunk/registration/src/modules/Register.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/modules/Register.ycp?rev=53494&r1=53493&r2=53494&view=diff ============================================================================== --- trunk/registration/src/modules/Register.ycp (original) +++ trunk/registration/src/modules/Register.ycp Thu Nov 20 17:35:41 2008 @@ -922,6 +922,19 @@ } +/* + * callbackAuthenticationOnRefresh + * dummy callbackfunction to disable the authentication errors + */ +global map<string, any> callbackAuthenticationOnRefresh() +{ + y2error("Refreshing a service or repository filed because of an authentication error."); + y2error("This is a valid scenario though, and only means that registration needs to be run."); + y2error("Registration will now continue without a warning to the user."); + return (map<string, any>) $[ "continue" : false, + "username" : "", + "password" : "" ]; +} /* @@ -992,8 +1005,8 @@ map<string, any> serviceDetails = $[]; serviceDetails = (map<string, any>) Pkg::ServiceGet(service); - serviceDetails["repos_to_enable"] = catalogToEnable; - serviceDetails["repos_to_disable"] = catalogToDisable; + serviceDetails["repos_to_enable"] = union(serviceDetails["repos_to_enable"]:[], catalogToEnable); + serviceDetails["repos_to_disable"] = union(serviceDetails["repos_to_disable"]:[], catalogToDisable); // enabled flag must not be present - otherwise all catalogs will be activated serviceDetails = remove(serviceDetails, "enabled"); @@ -1320,6 +1333,16 @@ } } + // finish sources (bnc#447080) + if ( Pkg::SourceFinishAll() ) + { + y2milestone("Successfully finished all sources.") + } + else + { + y2error("Failed to finish all sources."); + } + if ( repoUpdateSuccessful ) { y2error("SuseRegister will now save the lastZmdConfig."); @@ -1396,6 +1419,9 @@ return 199; } +// y2debug("Setting Pkg::CallbackAuthentication to a dummy function"); +// Pkg::CallbackAuthentication("Register::callbackAuthenticationOnRefresh"); + y2milestone("Initially refreshing services."); // refresh all services _once_ before interacting with SuseRegister allCurrentServices = Pkg::ServiceAliases(); @@ -1414,6 +1440,9 @@ Pkg::SourceForceRefreshNow(srcID); }); y2milestone("Initial refreshing ended."); + +// y2debug("Resetting Pkg::CallbackAuthentication to default."); +// Pkg::CallbackAuthentication(nil); } // initialize SuseRegister -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org