[yast-commit] r60175 - in /branches/SuSE-Code-11-SP1-Branch/add-on-creator: VERSION package/yast2-add-on-creator.changes src/AddOnCreator.ycp
Author: jsuchome Date: Tue Dec 22 14:37:28 2009 New Revision: 60175 URL: http://svn.opensuse.org/viewcvs/yast?rev=60175&view=rev Log: - added some path escaping - when generating new package descriptions, delete save entries of packages with same name (bnc#486041) - 2.17.14 Modified: branches/SuSE-Code-11-SP1-Branch/add-on-creator/VERSION branches/SuSE-Code-11-SP1-Branch/add-on-creator/package/yast2-add-on-creator.changes branches/SuSE-Code-11-SP1-Branch/add-on-creator/src/AddOnCreator.ycp Modified: branches/SuSE-Code-11-SP1-Branch/add-on-creator/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/add-on-creator/VERSION?rev=60175&r1=60174&r2=60175&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/add-on-creator/VERSION (original) +++ branches/SuSE-Code-11-SP1-Branch/add-on-creator/VERSION Tue Dec 22 14:37:28 2009 @@ -1 +1 @@ -2.17.13 +2.17.14 Modified: branches/SuSE-Code-11-SP1-Branch/add-on-creator/package/yast2-add-on-creator.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/add-on-creator/package/yast2-add-on-creator.changes?rev=60175&r1=60174&r2=60175&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/add-on-creator/package/yast2-add-on-creator.changes (original) +++ branches/SuSE-Code-11-SP1-Branch/add-on-creator/package/yast2-add-on-creator.changes Tue Dec 22 14:37:28 2009 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Tue Dec 22 14:16:06 CET 2009 - jsuchome@suse.cz + +- added some path escaping +- when generating new package descriptions, delete save entries of + packages with same name (bnc#486041) +- 2.17.14 + +------------------------------------------------------------------- Thu Nov 19 14:54:25 CET 2009 - jsuchome@suse.cz - backport changes done after SLE11 release: Modified: branches/SuSE-Code-11-SP1-Branch/add-on-creator/src/AddOnCreator.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/add-on-creator/src/AddOnCreator.ycp?rev=60175&r1=60174&r2=60175&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/add-on-creator/src/AddOnCreator.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/add-on-creator/src/AddOnCreator.ycp Tue Dec 22 14:37:28 2009 @@ -1481,7 +1481,7 @@ string rpm_path = current_product["rpm_path"]:""; // 1. find the used architectures - string cmd = sformat ("cd %1; find -maxdepth 1 -type d", rpm_path); + string cmd = sformat ("cd '%1'; find -maxdepth 1 -type d", rpm_path); map out = $[]; if (rpm_path != "") out = (map) SCR::Execute (.target.bash_output, cmd); @@ -1505,14 +1505,14 @@ // 2. get the list of architectures from RPM's if (rpm_path != "") out = (map) SCR::Execute (.target.bash_output, - sformat ("find %1 -name '*.rpm'", rpm_path)); + sformat ("find '%1' -name '*.rpm'", rpm_path)); y2milestone ("asking the RPM's for ARCH and NAME..."); // for which architectures are the packages built map<string,any> package_architectures = $[]; foreach (string f, splitstring (out["stdout"]:"", "\n"), { if (f == "") return; out = (map) SCR::Execute (.target.bash_output, - sformat ("rpm -q -p %1 --qf \"%%{ARCH}\n%%{NAME}\n%%|SOURCERPM?{bin}:{src}|\"",f)); + sformat ("rpm -q -p '%1' --qf \"%%{ARCH}\n%%{NAME}\n%%|SOURCERPM?{bin}:{src}|\"",f)); list lines = splitstring (out["stdout"]:"", "\n"); string arch = lines[0]:""; string name = lines[1]:""; @@ -1574,12 +1574,12 @@ if (required_rpm_path != "" && required_rpm_path != rpm_path) { out = (map) SCR::Execute (.target.bash_output, - sformat ("cd %1; find -name '*.rpm'", required_rpm_path)); + sformat ("cd '%1'; find -name '*.rpm'", required_rpm_path)); y2milestone ("asking the RPM's for NAME..."); list<string> inputs = create_argument_lists (out["stdout"]:""); string output = ""; foreach (string input, inputs, { - string cmd = sformat ("cd %1; rpm --qf \"%%{NAME}\n\" -qp %2", + string cmd = sformat ("cd '%1'; rpm --qf \"%%{NAME}\n\" -qp %2", required_rpm_path, input); out = (map) SCR::Execute (.target.bash_output, cmd); output = output + out["stdout"]:"" + "\n"; @@ -1718,6 +1718,7 @@ packages_descr[lang] = ReadPackagesFile (file); return; } + map package_names = mapmap (string p, map d, packages_descr[lang]:$[], ``($[ splitstring (p, " ")[0]:p : p])); // now, we need to merge old data from packages_descr with currently // generated ones (TODO this works only for packages.en) foreach (string p, map d, (map<string,map>) ReadPackagesFile (file), { @@ -1725,6 +1726,12 @@ { y2debug ("new package %1", d); packages_descr[lang,p] = d; + string name = splitstring (p, " ")[0]:p; + if (package_names[name]:"" != "") + { + y2milestone ("replacing saved '%1' with present '%2'", package_names[name]:"", p); + packages_descr[lang] = remove (packages_descr[lang]:$[], package_names[name]:""); + } } }); }); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsuchome@svn.opensuse.org