[yast-commit] r52803 - in /trunk/product-creator: package/yast2-product-creator.changes src/dialogs.ycp
Author: lslezak Date: Fri Oct 31 16:22:26 2008 New Revision: 52803 URL: http://svn.opensuse.org/viewcvs/yast?rev=52803&view=rev Log: - read and set the product name (bnc#440609) Modified: trunk/product-creator/package/yast2-product-creator.changes trunk/product-creator/src/dialogs.ycp Modified: trunk/product-creator/package/yast2-product-creator.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/package/yast2-product-creator.changes?rev=52803&r1=52802&r2=52803&view=diff ============================================================================== --- trunk/product-creator/package/yast2-product-creator.changes (original) +++ trunk/product-creator/package/yast2-product-creator.changes Fri Oct 31 16:22:26 2008 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri Oct 31 16:20:05 CET 2008 - lslezak@suse.cz + +- read and set the product name (bnc#440609) + +------------------------------------------------------------------- Fri Oct 24 13:12:05 CEST 2008 - lslezak@suse.cz - File "/PS3/otheros/otheros.bld" is optional when creating a PPC Modified: trunk/product-creator/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/dialogs.ycp?rev=52803&r1=52802&r2=52803&view=diff ============================================================================== --- trunk/product-creator/src/dialogs.ycp (original) +++ trunk/product-creator/src/dialogs.ycp Fri Oct 31 16:22:26 2008 @@ -862,6 +862,24 @@ return (symbol)ret; } + string ProductFromRepo(integer repo_id) + { + map<string,string> read_content = ProductCreator::ReadContentFile(repo_id); + string prod_name = read_content["LABEL"]:""; + + y2milestone("Product name: %1", prod_name); + return prod_name; + } + + string ProductFromURL(string url) + { + integer src_id = ProductCreator::UrlToId([url])[0]:-1; + y2milestone("Reading product name from src %1", src_id); + string prod_name = ProductFromRepo(src_id); + + return prod_name; + } + define symbol baseProductSelectionDialog() { if (size(ProductCreator::Config["sources"]:[]) == 1) @@ -872,7 +890,14 @@ // remove the option if it exists if (haskey (ProductCreator::Config, "base_repo")) ProductCreator::Config = remove(ProductCreator::Config, "base_repo"); - return going_back ? `back : `next; + symbol ret = going_back ? `back : `next; + + if (ret == `next) + { + ProductCreator::Config["product"] = ProductFromURL((ProductCreator::Config["sources"]:[])[0]:""); + } + + return ret; } /* dialog caption */ @@ -944,6 +969,7 @@ if (ret == `next) { ProductCreator::Config["base_repo"] = base; + ProductCreator::Config["product"] = ProductFromURL(base); } return ret; @@ -1461,6 +1487,7 @@ // do not return patterns selected by dependencies foreach (map pat, Pkg::ResolvableProperties ("", `pattern, ""), { + y2debug("Processing pattern: %1", pat); if (pat["status"]:`none == `selected) { y2milestone ("pat %1 selected by %2" , pat["name"]:"", -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
lslezak@svn.opensuse.org