Author: jsuchome Date: Thu Apr 3 16:18:06 2008 New Revision: 46037 URL: http://svn.opensuse.org/viewcvs/yast?rev=46037&view=rev Log: - write the full URL into config.xml for https sources (bnc#376666) - 2.13.32 Modified: branches/SuSE-SLE-10-SP2-Branch/product-creator/VERSION branches/SuSE-SLE-10-SP2-Branch/product-creator/package/yast2-product-creator.changes branches/SuSE-SLE-10-SP2-Branch/product-creator/src/Kiwi.ycp branches/SuSE-SLE-10-SP2-Branch/product-creator/src/kiwi_dialogs.ycp Modified: branches/SuSE-SLE-10-SP2-Branch/product-creator/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/product... ============================================================================== --- branches/SuSE-SLE-10-SP2-Branch/product-creator/VERSION (original) +++ branches/SuSE-SLE-10-SP2-Branch/product-creator/VERSION Thu Apr 3 16:18:06 2008 @@ -1 +1 @@ -2.13.31 +2.13.32 Modified: branches/SuSE-SLE-10-SP2-Branch/product-creator/package/yast2-product-creator.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/product... ============================================================================== --- branches/SuSE-SLE-10-SP2-Branch/product-creator/package/yast2-product-creator.changes (original) +++ branches/SuSE-SLE-10-SP2-Branch/product-creator/package/yast2-product-creator.changes Thu Apr 3 16:18:06 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Apr 3 14:30:16 CEST 2008 - jsuchome@suse.cz + +- write the full URL into config.xml for https sources (bnc#376666) +- 2.13.32 + +------------------------------------------------------------------- Fri Feb 29 15:41:59 CET 2008 - jsuchome@suse.cz - fixes for bnc#364838: Modified: branches/SuSE-SLE-10-SP2-Branch/product-creator/src/Kiwi.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/product... ============================================================================== --- branches/SuSE-SLE-10-SP2-Branch/product-creator/src/Kiwi.ycp (original) +++ branches/SuSE-SLE-10-SP2-Branch/product-creator/src/Kiwi.ycp Thu Apr 3 16:18:06 2008 @@ -126,18 +126,23 @@ // ... otherwise, we must ask zypp: string type = "yast2"; - string source_path = adapt_source_path (source); foreach (map sourcemap, all_sources, { integer srcid = sourcemap["SrcId"]:-1; map data = Pkg::SourceGeneralData (srcid); string url = data["url"]:""; - if (url == source || url == source_path) + if (url == source || url == adapt_source_path (source)) { if (data["type"]:"" == "Plaindir") type = "rpm-dir"; if (data["type"]:"" == "YUM") type = "rpm-md"; + map parsed = URL::Parse(url); + if (parsed["scheme"]:"" == "https") + { + // change source url to contain password + source = Pkg::SourceURL (srcid); + } } }); ret = $[ @@ -146,7 +151,7 @@ "__children": [ $[ "__key" : "source", - "path" : source_path + "path" : adapt_source_path (source) ] ] ]; @@ -579,6 +584,8 @@ config_dir = tmp_dir + "/" + KiwiConfig["name"]:""; SCR::Execute (.target.mkdir, config_dir); SCR::Write (.target.string, config_dir + "/config.xml", write_string); + // config.xml may contain password + SCR::Execute (.target.bash, sformat ("chmod 600 %1/config.xml",config_dir)); foreach (string dir, ["root_dir", "config_dir"], { foreach (string val, KiwiConfig[dir]:[], { string realdir = config_dir + "/" + substring (dir, 0, search (dir, "_")); @@ -783,10 +790,18 @@ if (substring (source, 0, 1) == "/") url = "dir://"; url = url + source; + map parsed = URL::Parse (url); + string full_url = url; + if (parsed["pass"]:"" != "") + { + parsed = remove (parsed, "pass"); + url = URL::Build (parsed); + } current_repositories [url] = $[ "url" : url, "plaindir" : repo["type"]:"" == "rpm-dir", "org" : repo, + "full_url" : full_url ]; } }); Modified: branches/SuSE-SLE-10-SP2-Branch/product-creator/src/kiwi_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/product... ============================================================================== --- branches/SuSE-SLE-10-SP2-Branch/product-creator/src/kiwi_dialogs.ycp (original) +++ branches/SuSE-SLE-10-SP2-Branch/product-creator/src/kiwi_dialogs.ycp Thu Apr 3 16:18:06 2008 @@ -1935,10 +1935,13 @@ return true; } integer source_ret = -1; + string full_url = url; + if (repo["full_url"]:"" != "" && repo["full_url"]:"" != url) + full_url = repo["full_url"]:""; if (repo["plaindir"]:false) - source_ret = Pkg::SourceCreateType (url, "", "Plaindir"); + source_ret = Pkg::SourceCreateType (full_url, "", "Plaindir"); else - source_ret = Pkg::SourceCreate (url, ""); + source_ret = Pkg::SourceCreate (full_url, ""); if (source_ret == -1) { failed_repositories = add (failed_repositories, url); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org