Author: jsuchome Date: Mon Apr 14 14:26:34 2008 New Revision: 46575 URL: http://svn.opensuse.org/viewcvs/yast?rev=46575&view=rev Log: - added an option for generating Changelog using mk_changelog - 2.16.7 Modified: trunk/add-on-creator/VERSION trunk/add-on-creator/package/yast2-add-on-creator.changes trunk/add-on-creator/src/AddOnCreator.ycp trunk/add-on-creator/src/add-on-creator.ycp trunk/add-on-creator/src/complex.ycp trunk/add-on-creator/src/helps.ycp Modified: trunk/add-on-creator/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/VERSION?rev=46575&... ============================================================================== --- trunk/add-on-creator/VERSION (original) +++ trunk/add-on-creator/VERSION Mon Apr 14 14:26:34 2008 @@ -1 +1 @@ -2.16.6 +2.16.7 Modified: trunk/add-on-creator/package/yast2-add-on-creator.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/package/yast2-add-... ============================================================================== --- trunk/add-on-creator/package/yast2-add-on-creator.changes (original) +++ trunk/add-on-creator/package/yast2-add-on-creator.changes Mon Apr 14 14:26:34 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Apr 14 14:17:41 CEST 2008 - jsuchome@suse.cz + +- added an option for generating Changelog using mk_changelog +- 2.16.7 + +------------------------------------------------------------------- Mon Apr 7 10:43:35 CEST 2008 - jsuchome@suse.cz - offered SLE10SP2 products as a base for new AddOn (bnc#377091) Modified: trunk/add-on-creator/src/AddOnCreator.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/AddOnCreator.y... ============================================================================== --- trunk/add-on-creator/src/AddOnCreator.ycp (original) +++ trunk/add-on-creator/src/AddOnCreator.ycp Mon Apr 14 14:26:34 2008 @@ -600,21 +600,9 @@ } exit $stat"; -// description of packages (initially generated by create_package_descr -//global map<string,map> packages_descr = $[]; - // just key:value mapping based on content list global map<string,string> content_map = $[]; -//global map<string,map> patterns = $[]; - -// path to directory with RPM's -//global string rpm_path = nil; - -// path to directory with RPM's, used only for building patterns -// and not present on AddOn -//global string required_rpm_path = ""; - /** * if we have 'source add-on' to base the new one on */ @@ -1951,6 +1939,31 @@ } /** + * Generate Changelog for the product + * @param base_path base output path + */ +boolean GenerateChangelog (string base_path) +{ + if (!Package::Installed ("inst-source-utils") && + !FileUtils::Exists ("/usr/bin//usr/bin/mk_changelog")) + { + y2error("inst-source-utils not installed and mk_changelog not present"); + return false; + } + if (!FileUtils::Exists (base_path)) return false; + + map out = (map) SCR::Execute (.target.bash_output, + sformat ("cd '%1'; mk_changelog",base_path), + $[ "ROOT_ON_CD" : content_map["DATADIR"]:""]); + if (out["stderr"]:"" != "") + { + y2warning ("mk_changelog returns %1", out); + } + return true; + +} + +/** * Generate servicepack.tar.gz archive for bootable media * @param base_path base output path */ @@ -2523,11 +2536,14 @@ Progress::NextStage(); - if (!SignAddOn (base_output_path, current_product["gpg_key"]:"")) - return false; + if (current_product["changelog"]:false) + GenerateChangelog (base_output_path); WriteServicepackArchive (base_output_path); + if (!SignAddOn (base_output_path, current_product["gpg_key"]:"")) + return false; + CreateDirectoryYaSTFiles (base_output_path); if (current_product["iso"]:false) Modified: trunk/add-on-creator/src/add-on-creator.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/add-on-creator... ============================================================================== --- trunk/add-on-creator/src/add-on-creator.ycp (original) +++ trunk/add-on-creator/src/add-on-creator.ycp Mon Apr 14 14:26:34 2008 @@ -317,6 +317,7 @@ ReportMissingDir (dir); } } + current_product["changelog"] = haskey (options, "changelog"); if (!haskey (options, "do_not_sign")) { @@ -473,10 +474,16 @@ options["gpg_key"] = product["gpg_key"]:""; product = union (product, ParseGPGData (options)); + // only set "generate" when requested, otherwise the saved info is used + if (haskey (options, "changelog")) + product["changelog"] = true; + AddOnCreator::SelectProduct (product); AddOnCreator::PrepareBuild (); AddOnCreator::BuildAddOn (); - return false; // no write needed (configs were not modified) + return false; + // no write needed (configs were not modified, or there was only one-time + // modification: iso, generated) } /** @@ -658,6 +665,10 @@ "help" : _("Number of selected add-on (see 'list' command for product numbers)"), "type" : "integer" ], + "changelog" : $[ + // command line help text for 'changelog' option + "help" : _("Generate Changelog file"), + ], ], "mappings" : $[ "create" : [ "content", "rpm_dir", "package_descriptions_dir", @@ -665,6 +676,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", ], "clone" : [ "existing", "generate_descriptions", "content", "package_descriptions_dir", "patterns_dir", "output_dir", @@ -672,6 +684,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", ], "sign" : [ "addon_dir", "gpg_key", "passphrase", "passphrase_file", "create_iso", "iso_name", "iso_output_dir", @@ -680,6 +693,7 @@ "build" : [ "number", "gpg_key", "passphrase", "passphrase_file", "resign_packages", "create_iso", "iso_name", "iso_output_dir", + "changelog", ], "delete" : [ "number" Modified: trunk/add-on-creator/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/complex.ycp?re... ============================================================================== --- trunk/add-on-creator/src/complex.ycp (original) +++ trunk/add-on-creator/src/complex.ycp Mon Apr 14 14:26:34 2008 @@ -1685,6 +1685,7 @@ string caption = _("Output Settings"); map current_product = AddOnCreator::current_product; boolean iso = current_product["iso"]:false; + boolean changelog = current_product["changelog"]:false; boolean autorun = false; map<string,string> content_map = AddOnCreator::content_map; @@ -1715,6 +1716,9 @@ // text entry label `TextEntry (`id(`iso_name), _("Image File Name"), iso_name) ), + `VSpacing (0.4), + // check box label + `Left (`CheckBox (`id(`changelog), _("&Generate Changelog"),changelog)), `VSpacing (4), `HBox ( `HStretch (), @@ -1735,6 +1739,7 @@ ret = UI::UserInput(); string dir = (string)UI::QueryWidget (`id(`output_path), `Value); + boolean changelog = (boolean)UI::QueryWidget (`id(`changelog), `Value); boolean iso = (boolean)UI::QueryWidget (`id(`iso), `Value); iso_name = (string)UI::QueryWidget (`id(`iso_name), `Value); UI::ChangeWidget (`id(`iso_name), `Enabled, iso); @@ -1751,6 +1756,7 @@ AddOnCreator::current_product["base_output_path"] = dir; AddOnCreator::current_product["iso"] = iso; AddOnCreator::current_product["iso_name"] = iso_name; + AddOnCreator::current_product["changelog"] = changelog; break; } else if (ret == `next) { @@ -1774,6 +1780,7 @@ AddOnCreator::current_product["base_output_path"] = dir; AddOnCreator::current_product["iso"] = iso; AddOnCreator::current_product["iso_name"] = iso_name; + AddOnCreator::current_product["changelog"] = changelog; if (iso && !Package::Install ("mkisofs")) { UI::ChangeWidget (`id(`iso), `Value, false); Modified: trunk/add-on-creator/src/helps.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/helps.ycp?rev=... ============================================================================== --- trunk/add-on-creator/src/helps.ycp (original) +++ trunk/add-on-creator/src/helps.ycp Mon Apr 14 14:26:34 2008 @@ -115,6 +115,9 @@ "output" : _("<p>Specify the path to the directory in which the add-on product should be created. Select <b>Create ISO Image</b> to create the ISO image of the product in the output directory.</p>") + // help text for the 'various settings' dialog + _("<p>Use <b>Generate Changelog</b> to generate a Changelog file with all the changes of packages on the add-on product made in the last two years.</p>") + + + // help text for the 'various settings' dialog _("<p>Adapt the workflow of the add-on product with <b>Configure Workflow</b>. Use <b>Optional Files</b> to configure texts of <tt>README</tt> files, licenses, and other optional values.</p>"), // workflow help text -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org