[yast-commit] r58874 - in /trunk/installation: VERSION package/yast2-installation.changes src/clients/inst_addon_update_sources.ycp
Author: locilka Date: Thu Oct 1 13:30:00 2009 New Revision: 58874 URL: http://svn.opensuse.org/viewcvs/yast?rev=58874&view=rev Log: - Adjusting understandable name for update URLs added during second stage of installation (bnc #542792). - 2.18.29 Modified: trunk/installation/VERSION trunk/installation/package/yast2-installation.changes trunk/installation/src/clients/inst_addon_update_sources.ycp Modified: trunk/installation/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/VERSION?rev=58874&r1=58873&r2=58874&view=diff ============================================================================== --- trunk/installation/VERSION (original) +++ trunk/installation/VERSION Thu Oct 1 13:30:00 2009 @@ -1 +1 @@ -2.18.28 +2.18.29 Modified: trunk/installation/package/yast2-installation.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=58874&r1=58873&r2=58874&view=diff ============================================================================== --- trunk/installation/package/yast2-installation.changes (original) +++ trunk/installation/package/yast2-installation.changes Thu Oct 1 13:30:00 2009 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Oct 1 13:27:16 CEST 2009 - locilka@suse.cz + +- Adjusting understandable name for update URLs added during second + stage of installation (bnc #542792). +- 2.18.29 + +------------------------------------------------------------------- Tue Sep 29 16:41:32 CEST 2009 - kmachalkova@suse.cz - Correct HTML format tags in helptext (bnc#540784) Modified: trunk/installation/src/clients/inst_addon_update_sources.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_addon_update_sources.ycp?rev=58874&r1=58873&r2=58874&view=diff ============================================================================== --- trunk/installation/src/clients/inst_addon_update_sources.ycp (original) +++ trunk/installation/src/clients/inst_addon_update_sources.ycp Thu Oct 1 13:30:00 2009 @@ -40,13 +40,23 @@ /** * @return the installation sources to be added */ -list<string> UpdateUrls () { - // get all available products - list<map<string,any> > products = Pkg::ResolvableProperties ("", `product, ""); - list<list<string> > urls = maplist (map<string, any> p, products, { - return p["update_urls"]:[]; +map <string, string> UpdateUrls () { + map <string, string> urls = $[]; + list <map <string,any> > products = Pkg::ResolvableProperties ("", `product, ""); + + foreach (map<string, any> p, products, { + foreach (string u, p["update_urls"]:[], { + // bnc #542792 + // Repository name must be generated from product details + urls[u] = sformat ( + _("Updates for %1 %2"), + p["display_name"]:p["name"]:p["summary"]:_("Unknown Product"), + p["version"]:"" + ); + }); }); - return (list<string>)toset (flatten (urls)); + + return urls; } @@ -64,23 +74,23 @@ y2milestone ("sources known: %1", knownUrls); map<string, boolean> is_known = listmap (string u, knownUrls, ``($[u: true])); -list<string> updateUrls = UpdateUrls (); +map <string, string> updateUrls = UpdateUrls (); y2milestone ("sources for updates: %1", updateUrls); -list<string> addUrls = filter (string u, updateUrls, ``( ! is_known[u]:false )); +map <string, string> addUrls = filter (string url, string name, updateUrls, ``( ! is_known[url]:false )); y2milestone ("sources to add: %1", addUrls); -if (addUrls != []) +if (addUrls != $[]) { Popup::ShowFeedback (heading, message); list<integer> added_ids = []; - foreach (string u, addUrls, { + foreach (string url, string name, addUrls, { boolean again = true; while (again) { - integer srcid = Pkg::SourceCreate (u, "/"); - y2milestone ("got %1 from creating %2", srcid, u); + integer srcid = Pkg::SourceCreate (url, "/"); + y2milestone ("got %1 from creating %2", srcid, url); // wrong srcid, must have failed if (srcid == -1) { @@ -94,7 +104,7 @@ Pkg::LastError() ))) { // try again - u = editUrl (u); + url = editUrl (url); } else { // abort again = false; @@ -102,6 +112,9 @@ // everything is ok } else { + // bnc #542792 + // Repository name must be set + Pkg::SourceEditSet([ $["SrcId" : srcid, "name" : name] ]); added_ids = add (added_ids, srcid); again = false; } -- 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