Author: locilka Date: Thu Sep 20 14:27:34 2007 New Revision: 40983 URL: http://svn.opensuse.org/viewcvs/yast?rev=40983&view=rev Log: Try to migrate also with repository type Modified: trunk/installation/src/clients/inst_upgrade_urls.ycp Modified: trunk/installation/src/clients/inst_upgrade_urls.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_upgrade_urls.ycp?rev=40983&r1=40982&r2=40983&view=diff ============================================================================== --- trunk/installation/src/clients/inst_upgrade_urls.ycp (original) +++ trunk/installation/src/clients/inst_upgrade_urls.ycp Thu Sep 20 14:27:34 2007 @@ -225,6 +225,24 @@ return ret; } + string FindURLType (string baseurl) { + if (baseurl == "" || baseurl == nil) { + y2error ("Base URL not defined!"); + return ""; + } + + string ret = ""; + + foreach (map one_url, urls, { + if (baseurl == one_url["url"]:"-A-" && one_url["type"]:"" != "") { + ret = one_url["type"]:""; + break; + } + }); + + return ret; + } + void EditItem (integer currentitem) { if (currentitem == nil || currentitem < 0) { y2error ("Cannot edit item: %1", currentitem); @@ -545,6 +563,13 @@ // bugzilla #309317 "alias" : GetUniqueAlias (one_url), ]; + + // do not probe! adding as disabled! + string repo_type = FindURLType (one_url); + if (repo_type != nil && repo_type != "") { + repoadd["type"] = repo_type; + } + y2milestone ("Adding repo (disabled): %1", repoadd); integer new_id = Pkg::RepositoryAdd (repoadd); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org