Author: jsuchome
Date: Wed Dec 17 21:23:36 2008
New Revision: 54249
URL: http://svn.opensuse.org/viewcvs/yast?rev=54249&view=rev
Log:
- added CLI support for product file (disable generating, offer
path to import)
- removed debug popup
- enable importing product file with dependency data
- 2.17.10
Modified:
branches/SuSE-Code-11-Branch/add-on-creator/VERSION
branches/SuSE-Code-11-Branch/add-on-creator/package/yast2-add-on-creator.changes
branches/SuSE-Code-11-Branch/add-on-creator/src/AddOnCreator.ycp
branches/SuSE-Code-11-Branch/add-on-creator/src/add-on-creator.ycp
branches/SuSE-Code-11-Branch/add-on-creator/src/complex.ycp
Modified: branches/SuSE-Code-11-Branch/add-on-creator/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/add-on-creator/VERSION?rev=54249&r1=54248&r2=54249&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/add-on-creator/VERSION (original)
+++ branches/SuSE-Code-11-Branch/add-on-creator/VERSION Wed Dec 17 21:23:36 2008
@@ -1 +1 @@
-2.17.9
+2.17.10
Modified: branches/SuSE-Code-11-Branch/add-on-creator/package/yast2-add-on-creator.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/add-on-creator/package/yast2-add-on-creator.changes?rev=54249&r1=54248&r2=54249&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/add-on-creator/package/yast2-add-on-creator.changes (original)
+++ branches/SuSE-Code-11-Branch/add-on-creator/package/yast2-add-on-creator.changes Wed Dec 17 21:23:36 2008
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Wed Dec 17 14:34:32 CET 2008 - jsuchome@suse.cz
+
+- added CLI support for product file (disable generating, offer
+ path to import)
+- removed debug popup
+- enable importing product file with dependency data
+- 2.17.10
+
+-------------------------------------------------------------------
Fri Dec 12 16:02:16 CET 2008 - jsuchome@suse.cz
- call bs_productconvert from correct path
Modified: branches/SuSE-Code-11-Branch/add-on-creator/src/AddOnCreator.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/add-on-creator/src/AddOnCreator.ycp?rev=54249&r1=54248&r2=54249&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/add-on-creator/src/AddOnCreator.ycp (original)
+++ branches/SuSE-Code-11-Branch/add-on-creator/src/AddOnCreator.ycp Wed Dec 17 21:23:36 2008
@@ -116,6 +116,8 @@
"resign_packages" : false,
// current GPG key
"gpg_key" : "",
+ // if we should generate -release package containing .prod file
+ "generate_release_package" : true,
];
// skeleton for current_product map (with keys and default values)
@@ -745,9 +747,6 @@
// if package description files should be compressed
global boolean compress_package_descriptions = false;
-// if we should generate -release package containing .prod file
-global boolean generate_release_package = true;
-
/**
* Data was modified?
*/
@@ -850,7 +849,7 @@
else
// manual modifications present -> generate
// this is used when product xml was read from rpm
- generate_release_package = true;
+ current_product["generate_release_package"] = true;
}
else
retmap[key,"value"] = val;
@@ -1610,7 +1609,7 @@
if (release_packages != [])
{
// when release package is present, do not offer to change it
- generate_release_package = false;
+ current_product["generate_release_package"] = false;
}
list requireslist = [];
@@ -2207,7 +2206,7 @@
*/
global boolean GenerateReleasePackage (string base_path) {
- if (!generate_release_package)
+ if (!current_product["generate_release_package"]:false)
{
y2milestone ("release package should not be generated");
return true;
@@ -2227,7 +2226,12 @@
// write the result into temporary .prod file
string name = content_map["NAME"]:"add-on";
- map submap = product_xml["product",0]:$[];
+ map submap = product_xml;
+ if (size (product_xml["productdefinition",0,"products"]:[]) > 0)
+ {
+ submap = product_xml["productdefinition",0,"products",0]:$[];
+ }
+ submap = submap["product",0]:$[];
submap["id"] = name;
submap["name",0, content_key] = name;
@@ -2362,8 +2366,6 @@
SCR::Execute (.target.bash, sformat ("/bin/cp -r %1 '%2/%3'",
package_path, full_data_path, arch));
});
-import "Popup";
-Popup::Message ("built");
// 5. delete the tmp files, so it doesn't mess possible next builds
SCR::Execute (.target.remove, prod_file_path);
SCR::Execute (.target.bash, sformat ("rm -rf '%1'", product_dir));
@@ -2851,7 +2853,6 @@
map modified_product = union (current_product, $[
"content_map" : content_map,
"product_info_values" : product_info_values,
- "generate_release_package" : generate_release_package,
"available_packages" : available_packages,
"arch_directories" : arch_directories,
"package2filename" : package2filename,
@@ -2888,8 +2889,6 @@
product_info[key] = desc;
});
- generate_release_package = product["generate_release_package"]:false;
-
// generate content from content_map
content = [];
foreach (string key, map entry, content_descr, {
Modified: branches/SuSE-Code-11-Branch/add-on-creator/src/add-on-creator.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/add-on-creator/src/add-on-creator.ycp?rev=54249&r1=54248&r2=54249&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/add-on-creator/src/add-on-creator.ycp (original)
+++ branches/SuSE-Code-11-Branch/add-on-creator/src/add-on-creator.ycp Wed Dec 17 21:23:36 2008
@@ -146,6 +146,22 @@
return false;
}
}
+ if (haskey (options, "product_file"))
+ {
+ string file = options["product_file"]:"";
+ if (FileUtils::Exists (file))
+ {
+ AddOnCreator::product_xml =
+ AddOnCreator::ReadProductXML (file);
+ AddOnCreator::product_info =
+ AddOnCreator::GetProductInfo (AddOnCreator::product_xml, false);
+ }
+ else
+ {
+ ReportMissingFile (file);
+ return false;
+ }
+ }
if (haskey (options, "package_descriptions_dir"))
{
string dir = options["package_descriptions_dir"]:"";
@@ -320,6 +336,11 @@
}
current_product["changelog"] = haskey (options, "changelog");
+ current_product["generate_release_package"] = true;
+ if (haskey (options, "no_release_package"))
+ {
+ current_product["generate_release_package"] = false;
+ }
if (!haskey (options, "do_not_sign"))
{
current_product = union (current_product, ParseGPGData (options));
@@ -495,7 +516,12 @@
if (haskey (options, "changelog"))
product["changelog"] = true;
+ // CLI option could replace the saved one
+ if (haskey (options, "no_release_package"))
+ product["generate_release_package"] = false;
+
AddOnCreator::SelectProduct (product);
+
AddOnCreator::PrepareBuild ();
AddOnCreator::BuildAddOn ();
return false;
@@ -686,6 +712,15 @@
// command line help text for 'changelog' option
"help" : _("Generate a Changelog file."),
],
+ "no_release_package" : $[
+ // command line help text for 'no_release_package' option
+ "help" : _("Do not generate the release package"),
+ ],
+ "product_file" : $[
+ // command line help text for 'product_file' option
+ "help" : _("Path to file with the product description (*.prod)"),
+ "type" : "string",
+ ],
],
"mappings" : $[
"create" : [ "content", "rpm_dir", "package_descriptions_dir",
@@ -693,7 +728,7 @@
"passphrase", "passphrase_file", "workflow", "y2update",
"y2update_packages_dir", "license", "do_not_sign", "iso_output_dir",
"resign_packages", "info", "extra_prov", "do_not_build",
- "changelog",
+ "changelog", "no_release_package", "product_file",
],
"clone" : [ "existing", "generate_descriptions", "content",
"package_descriptions_dir", "patterns_dir", "output_dir",
@@ -701,7 +736,7 @@
"gpg_key", "passphrase", "passphrase_file", "workflow", "y2update",
"y2update_packages_dir", "license", "do_not_sign", "iso_output_dir",
"resign_packages", "info", "extra_prov", "do_not_build",
- "changelog",
+ "changelog", "no_release_package", "product_file",
],
"sign" : [ "addon_dir", "gpg_key", "passphrase",
"passphrase_file", "create_iso", "iso_name", "iso_output_dir",
@@ -710,7 +745,7 @@
"build" : [
"number", "gpg_key", "passphrase", "passphrase_file",
"resign_packages", "create_iso", "iso_name", "iso_output_dir",
- "changelog",
+ "changelog", "no_release_package",
],
"delete" : [
"number"
Modified: branches/SuSE-Code-11-Branch/add-on-creator/src/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/add-on-creator/src/complex.ycp?rev=54249&r1=54248&r2=54249&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/add-on-creator/src/complex.ycp (original)
+++ branches/SuSE-Code-11-Branch/add-on-creator/src/complex.ycp Wed Dec 17 21:23:36 2008
@@ -693,7 +693,8 @@
list<map> content = AddOnCreator::content;
map product_xml = $[]; // used only when imported
map