[yast-commit] r47968 - in /branches/SuSE-Linux-11_0-Branch/add-on-creator: VERSION package/yast2-add-on-creator.changes src/AddOnCreator.ycp src/add-on-creator.ycp
Author: jsuchome Date: Mon Jun 2 08:27:26 2008 New Revision: 47968 URL: http://svn.opensuse.org/viewcvs/yast?rev=47968&view=rev Log: - CLI: read current product data after it was cleared (bnc#395753) - 2.16.12 Modified: branches/SuSE-Linux-11_0-Branch/add-on-creator/VERSION branches/SuSE-Linux-11_0-Branch/add-on-creator/package/yast2-add-on-creator.changes branches/SuSE-Linux-11_0-Branch/add-on-creator/src/AddOnCreator.ycp branches/SuSE-Linux-11_0-Branch/add-on-creator/src/add-on-creator.ycp Modified: branches/SuSE-Linux-11_0-Branch/add-on-creator/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_0-Branch/add-on-creator/VERSION?rev=47968&r1=47967&r2=47968&view=diff ============================================================================== --- branches/SuSE-Linux-11_0-Branch/add-on-creator/VERSION (original) +++ branches/SuSE-Linux-11_0-Branch/add-on-creator/VERSION Mon Jun 2 08:27:26 2008 @@ -1 +1 @@ -2.16.11 +2.16.12 Modified: branches/SuSE-Linux-11_0-Branch/add-on-creator/package/yast2-add-on-creator.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_0-Branch/add-on-creator/package/yast2-add-on-creator.changes?rev=47968&r1=47967&r2=47968&view=diff ============================================================================== --- branches/SuSE-Linux-11_0-Branch/add-on-creator/package/yast2-add-on-creator.changes (original) +++ branches/SuSE-Linux-11_0-Branch/add-on-creator/package/yast2-add-on-creator.changes Mon Jun 2 08:27:26 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri May 30 11:28:43 CEST 2008 - jsuchome@suse.cz + +- CLI: read current product data after it was cleared (bnc#395753) +- 2.16.12 + +------------------------------------------------------------------- Mon May 26 13:27:02 CEST 2008 - jsuchome@suse.cz - enable reading pattern files with more patterns (bnc#393515) Modified: branches/SuSE-Linux-11_0-Branch/add-on-creator/src/AddOnCreator.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_0-Branch/add-on-creator/src/AddOnCreator.ycp?rev=47968&r1=47967&r2=47968&view=diff ============================================================================== --- branches/SuSE-Linux-11_0-Branch/add-on-creator/src/AddOnCreator.ycp (original) +++ branches/SuSE-Linux-11_0-Branch/add-on-creator/src/AddOnCreator.ycp Mon Jun 2 08:27:26 2008 @@ -2388,7 +2388,10 @@ full_data_path = ""; } -// save the data with current configuration into global list +/** + * save the data with current configuration into global list + * + reset the current product map + */ global void CommitCurrentProduct () { map modified_product = union (current_product, $[ @@ -2554,6 +2557,7 @@ { // Error message (do not translate 'content' Report::Error (_("Cannot write content file.")); + return false; } WriteStringFiles (base_output_path, @@ -2569,6 +2573,7 @@ { // Error message Report::Error (_("Cannot create the output directory structure.")); + return false; } WritePatchesFiles (base_output_path, Modified: branches/SuSE-Linux-11_0-Branch/add-on-creator/src/add-on-creator.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Linux-11_0-Branch/add-on-creator/src/add-on-creator.ycp?rev=47968&r1=47967&r2=47968&view=diff ============================================================================== --- branches/SuSE-Linux-11_0-Branch/add-on-creator/src/add-on-creator.ycp (original) +++ branches/SuSE-Linux-11_0-Branch/add-on-creator/src/add-on-creator.ycp Mon Jun 2 08:27:26 2008 @@ -328,9 +328,19 @@ SCR::Execute (.target.mkdir, current_product["base_output_path"]:""); } AddOnCreator::current_product = current_product; + AddOnCreator::selected_product = -1; // new product AddOnCreator::CommitCurrentProduct (); + if (haskey (options, "do_not_build")) return true; + + // now, build the product that was added last: current product data + // must be initialized again: + AddOnCreator::current_product = + AddOnCreator::add_on_products[size(AddOnCreator::add_on_products)-1]:$[]; + // fill again other global values cleared by CommitCurrentProduct + AddOnCreator::SelectProduct (AddOnCreator::current_product); + return AddOnCreator::BuildAddOn (); } @@ -387,7 +397,6 @@ */ boolean SignAddOn (map<string,any> options) { - map current_product = AddOnCreator::current_product; AddOnCreator::only_sign_product = false; if (!haskey (options, "addon_dir")) { @@ -396,18 +405,25 @@ return false; } else - current_product["base_output_path"] = options["addon_dir"]:""; + { + AddOnCreator::current_product["base_output_path"] = + options["addon_dir"]:""; + } // we need to import same data from existing add-on (e.g. for iso name) - AddOnCreator::ImportExistingProduct(current_product["base_output_path"]:""); + AddOnCreator::ImportExistingProduct (options["addon_dir"]:""); AddOnCreator::FillContentDefaults (); + map current_product = AddOnCreator::current_product; + current_product = union (current_product, ParseGPGData (options)); current_product = union (current_product, ParseISOData (options)); AddOnCreator::only_sign_product = true; AddOnCreator::current_product = current_product; - AddOnCreator::CommitCurrentProduct (); - return AddOnCreator::BuildAddOn (); + AddOnCreator::BuildAddOn (); + return false; + // no write needed (configs were not modified, or there was only one-time + // modification: iso, gpg info) } /** -- 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