Author: jdsn
Date: Fri Nov 14 18:34:36 2008
New Revision: 53340
URL: http://svn.opensuse.org/viewcvs/yast?rev=53340&view=rev
Log:
fix repo type definition for adding sources (bnc#444770)
remove deprecated unused function
add more debug logging
service changes should not enable all its catalogs
refresh services prior to repositories
2.17.13
Modified:
trunk/registration/VERSION
trunk/registration/package/yast2-registration.changes
trunk/registration/src/clients/inst_suse_register.ycp
trunk/registration/src/modules/Register.ycp
Modified: trunk/registration/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/VERSION?rev=53340&r1=53339&r2=53340&view=diff
==============================================================================
--- trunk/registration/VERSION (original)
+++ trunk/registration/VERSION Fri Nov 14 18:34:36 2008
@@ -1 +1 @@
-2.17.12
+2.17.13
Modified: trunk/registration/package/yast2-registration.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/package/yast2-registration.changes?rev=53340&r1=53339&r2=53340&view=diff
==============================================================================
--- trunk/registration/package/yast2-registration.changes (original)
+++ trunk/registration/package/yast2-registration.changes Fri Nov 14 18:34:36 2008
@@ -1,4 +1,14 @@
-------------------------------------------------------------------
+Fri Nov 14 17:55:56 CET 2008 - jdsn@suse.de
+
+- fix repo type definition for adding sources (bnc#444770)
+- remove deprecated unused function
+- add more debug logging
+- service changes should not enable all its catalogs
+- refresh services prior to repositories
+- 2.17.13
+
+-------------------------------------------------------------------
Thu Nov 13 15:33:39 CET 2008 - jdsn@suse.de
- fix empty install message (bnc#444638)
Modified: trunk/registration/src/clients/inst_suse_register.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/clients/inst_suse_register.ycp?rev=53340&r1=53339&r2=53340&view=diff
==============================================================================
--- trunk/registration/src/clients/inst_suse_register.ycp (original)
+++ trunk/registration/src/clients/inst_suse_register.ycp Fri Nov 14 18:34:36 2008
@@ -1047,7 +1047,7 @@
* 112: the initialization of SuseRegister failed; no special message is used for that though
* 113: the initialization if the target failed - no interaction with the package system possible
* 198: the system did not find any browser to let the user perform the manual interaction part of the registration
- * 199: unknown error uccurred (no longer used)
+ * 199: unknown error uccurred
*/
}
Modified: trunk/registration/src/modules/Register.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/modules/Register.ycp?rev=53340&r1=53339&r2=53340&view=diff
==============================================================================
--- trunk/registration/src/modules/Register.ycp (original)
+++ trunk/registration/src/modules/Register.ycp Fri Nov 14 18:34:36 2008
@@ -923,25 +923,6 @@
-/*
- * add_update_sources
- *
- * read update sources from services file and add them to yast and zmd
- * @return a list of added URLs
- */
-global list<string> add_update_sources ()
-{
- if (!FileUtils::Exists (services_file))
- return [];
-
- // filters out empty items (#165860#c12)
- list<string> urls = String::NewlineItems (
- (string)SCR::Read(.target.string, services_file));
-
- return SourceManager::AddUpdateSources (urls);
-}
-
-
/*
* checkCatalogs
@@ -951,6 +932,8 @@
*/
global list<string> checkCatalogs(map taskList, string service)
{
+ y2debug("Task list of check catalogs for the service (%1): %2", service, taskList);
+
list<string> cSummary = [];
list<string> catalogToEnable = [];
list<string> catalogToDisable = [];
@@ -982,7 +965,7 @@
y2error("A catalog returned by SuseRegister has an invalid task: %1", catalog);
repoUpdateSuccessful = false;
}
- else if ( catDetail["TASK"]:"" == "le" || catDetail["TASK"]:"" == "le" )
+ else if ( catDetail["TASK"]:"" == "le" || catDetail["TASK"]:"" == "ld" )
{
y2milestone("According to SuseRegister a catalog does not need to be changed: %1 (%2)", catalog, service);
}
@@ -1012,6 +995,11 @@
serviceDetails["repos_to_enable"] = catalogToEnable;
serviceDetails["repos_to_disable"] = catalogToDisable;
+ // enabled flag must not be present - otherwise all catalogs will be activated
+ serviceDetails = remove(serviceDetails, "enabled");
+
+ y2debug("Setting service properties for service (%1): %2", service, serviceDetails);
+
if ( Pkg::ServiceSet(service, serviceDetails) )
{
y2milestone("Successfully updated the catalog settings of service: %1", service);
@@ -1046,6 +1034,8 @@
return [];
}
+ y2debug("Task list to update software repositories: %1", taskList);
+
list<string> summary = [];
list<map> currentSources = Pkg::SourceEditGet();
@@ -1096,9 +1086,8 @@
"name" : (string) ((map) pAny)["NAME"]:"",
"alias" : (string) ((map) pAny)["ALIAS"]:"",
"base_urls" : [ (string) ((map) pAny)["URL"]:"" ],
- "priority" : ((map) pAny)["PRIORITY"]:99,
- // ?? "prod_dir" : ((map) pAny)["PROD_DIR"]:"",
- "type" : (string) ((map) pAny)["TYPE"]:""
+ "priority" : ((map) pAny)["PRIORITY"]:99
+ // remove repo type (bnc#444770)
];
integer newSrcID = Pkg::RepositoryAdd( newSrcMap );
@@ -1317,17 +1306,17 @@
{
y2milestone("Changes to the repositories and services were successful. Now refreshing all of them.");
- list<integer> currentNewSources = Pkg::SourceGetCurrent( true );
- foreach (integer srcID, currentNewSources, {
- y2milestone("Refreshing source with ID: %1", srcID);
- Pkg::SourceForceRefreshNow(srcID);
- });
-
list<string> currentNewServices = Pkg::ServiceAliases();
foreach ( string serviceAlias, currentNewServices, {
y2milestone("Refreshing service with Alias: %1", serviceAlias);
Pkg::ServiceRefresh(serviceAlias);
});
+
+ list<integer> currentNewSources = Pkg::SourceGetCurrent( true );
+ foreach (integer srcID, currentNewSources, {
+ y2milestone("Refreshing source with ID: %1", srcID);
+ Pkg::SourceForceRefreshNow(srcID);
+ });
}
}
@@ -1355,8 +1344,11 @@
list<integer> allCurrentSources = [];
list<string> allCurrentServices = [];
+ map ui = UI::GetDisplayInfo();
+ boolean debugMode = (boolean) ui["y2debug"]:false;
+
map contextData = $[
- "debug" : 0,
+ "debug" : (debugMode ? 2:0),
"nooptional" : (submit_optional ? 0:1),
"nohwdata" : (submit_hwdata ? 0:1),
"forcereg" : (force_registration ? 1:0), // (bnc#443704)
@@ -1394,19 +1386,34 @@
y2milestone("Successfully initialized the target.");
isInitializedTarget = true;
- // refresh all sources _once_ before interacting with SuseRegister
- allCurrentSources = Pkg::SourceStartCache(true);
- foreach ( integer srcID, allCurrentSources, {
- y2milestone("Refreshing source with ID: %1", srcID);
- Pkg::SourceForceRefreshNow(srcID);
- });
+ if ( Pkg::SourceStartManager(true) )
+ {
+ y2milestone("Successfully started source manager.");
+ }
+ else
+ {
+ y2error("Failed to start source manager");
+ return 199;
+ }
+ y2milestone("Initially refreshing services.");
// refresh all services _once_ before interacting with SuseRegister
allCurrentServices = Pkg::ServiceAliases();
+
foreach ( string serviceAlias, allCurrentServices, {
y2milestone("Refreshing service with Alias: %1", serviceAlias);
Pkg::ServiceRefresh(serviceAlias);
});
+
+ y2milestone("Initially refreshing sources.");
+ // refresh all sources _once_ before interacting with SuseRegister
+ allCurrentSources = Pkg::SourceGetCurrent(true);
+
+ foreach ( integer srcID, allCurrentSources, {
+ y2milestone("Refreshing source with ID: %1", srcID);
+ Pkg::SourceForceRefreshNow(srcID);
+ });
+ y2milestone("Initial refreshing ended.");
}
// initialize SuseRegister
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org