[yast-commit] r57278 - in /trunk/product-creator: VERSION package/yast2-product-creator.changes src/Kiwi.ycp src/ProductCreator.ycp src/complex.ycp src/data/sysconfig.product-creator src/kiwi_dialogs.ycp

Author: jsuchome Date: Thu May 21 09:53:48 2009 New Revision: 57278 URL: http://svn.opensuse.org/viewcvs/yast?rev=57278&view=rev Log: - merged changes from CODE11: - added openssl-certs to default bootstrap section, so Update repos can work (bnc#491475) - read the whole kiwi process output (bnc#488799) - make content file optional (for empty repos, bnc#500527) - correct check for configuration type and version in templates (bnc#498439) - during configuration, do not throw away target image desctination (bnc#499489) - updated sysconfig template (DEFAULT_IMAGE_ARCHITECTURE) - added option to specify "additive" attribute to size (fate#305327) - detect and report conflicts in selected and deleted package lists (fate#305254) - allow building i386 images on x86_64 system (fate#305327) - 2.18.5 Modified: trunk/product-creator/VERSION trunk/product-creator/package/yast2-product-creator.changes trunk/product-creator/src/Kiwi.ycp trunk/product-creator/src/ProductCreator.ycp trunk/product-creator/src/complex.ycp trunk/product-creator/src/data/sysconfig.product-creator trunk/product-creator/src/kiwi_dialogs.ycp Modified: trunk/product-creator/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/VERSION?rev=57278... ============================================================================== --- trunk/product-creator/VERSION (original) +++ trunk/product-creator/VERSION Thu May 21 09:53:48 2009 @@ -1 +1 @@ -2.18.4 +2.18.5 Modified: trunk/product-creator/package/yast2-product-creator.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/package/yast2-pro... ============================================================================== --- trunk/product-creator/package/yast2-product-creator.changes (original) +++ trunk/product-creator/package/yast2-product-creator.changes Thu May 21 09:53:48 2009 @@ -1,4 +1,23 @@ ------------------------------------------------------------------- +Thu May 21 09:46:38 CEST 2009 - jsuchome@suse.cz + +- merged changes from CODE11: +- added openssl-certs to default bootstrap section, so Update repos + can work (bnc#491475) +- read the whole kiwi process output (bnc#488799) +- make content file optional (for empty repos, bnc#500527) +- correct check for configuration type and version in templates + (bnc#498439) +- during configuration, do not throw away target image desctination + (bnc#499489) +- updated sysconfig template (DEFAULT_IMAGE_ARCHITECTURE) +- added option to specify "additive" attribute to size (fate#305327) +- detect and report conflicts in selected and deleted package lists + (fate#305254) +- allow building i386 images on x86_64 system (fate#305327) +- 2.18.5 + +------------------------------------------------------------------- Wed Apr 22 08:03:46 CEST 2009 - jsuchome@suse.cz - look primary into base product for isolinux.cfg (bnc#496263) Modified: trunk/product-creator/src/Kiwi.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/Kiwi.ycp?rev=... ============================================================================== --- trunk/product-creator/src/Kiwi.ycp (original) +++ trunk/product-creator/src/Kiwi.ycp Thu May 21 09:53:48 2009 @@ -11,12 +11,14 @@ textdomain "product-creator"; + import "Arch"; import "Directory"; import "FileUtils"; import "Label"; import "Message"; import "Package"; import "Popup"; + import "ProductCreator"; import "Progress"; import "Report"; import "Security"; @@ -42,6 +44,9 @@ // bug 331733 global string supported_boot_images = ""; + // target architecture of image (can be only i386 if different from current one) + global string image_architecture = ""; + // directories with user-made templated global list<string> templates_dirs = []; @@ -446,7 +451,10 @@ UI::ChangeWidget (`id(`errlog), `LastLine, err + "\n"); } - string cmd = sformat ("ZYPP_READONLY_HACK=1 kiwi --nocolor --root %1 --prepare %2 --logfile terminal", chroot_dir, config_dir); + string linux32 = ""; + if (Arch::architecture () == "x86_64" && ProductCreator::GetArch () == "i386") + linux32 = "linux32"; + string cmd = sformat ("ZYPP_READONLY_HACK=1 %3 kiwi --nocolor --root %1 --prepare %2 --logfile terminal", chroot_dir, config_dir, linux32); if (selected_profiles != "" && selected_profiles != nil) cmd = cmd + selected_profiles; @@ -462,6 +470,13 @@ if (SCR::Read(.process.running, id) != true) { update_output (); + // explicitely check the process buffer after exit (bnc#488799) + string buf = (string) SCR::Read (.process.read, id); + string err_buf = (string) SCR::Read (.process.read_stderr, id); + if (buf != nil && buf != "") + UI::ChangeWidget (`id(`log), `LastLine, buf + "\n"); + if (err_buf != nil && err_buf != "") + UI::ChangeWidget (`id(`errlog), `LastLine, err_buf + "\n"); integer status = (integer) SCR::Read (.process.status, id); if (status != 0) @@ -481,7 +496,8 @@ // now continue with creating UI::ChangeWidget (`id(`log), `LastLine, "\n"); - cmd = sformat ("ZYPP_READONLY_HACK=1 kiwi --nocolor --create %1 -d %2 --logfile terminal", chroot_dir, out_dir); + cmd = sformat ("ZYPP_READONLY_HACK=1 %3 kiwi --nocolor --create %1 -d %2 --logfile terminal", + chroot_dir, out_dir, linux32); y2milestone ("calling '%1'", cmd); // label UI::ReplaceWidget (`id (`rpl), `Left (`Label (_("Creating Image")))); @@ -618,10 +634,10 @@ if (config != nil && config != $[]) { string name = config["name"]:""; - string ver = config["version"]:""; - if (config["image_type"]:"" != "system") + string ver = get_preferences (config, "version", ""); + if (config["description",0,"type"]:"" != "system") y2warning ("%1 not a 'system' image type, skipping", name); - else if (name_version[name]:"" == ver) + else if (name_version[name]:nil == ver) y2warning ("template %1,%2 already imported", name, ver); else { @@ -647,6 +663,13 @@ (string) SCR::Read (.sysconfig.product-creator.SUPPORTED_BOOT_IMAGES); if (supported_boot_images == nil) supported_boot_images = ""; + string architecture = + (string) SCR::Read (.sysconfig.product-creator.DEFAULT_IMAGE_ARCHITECTURE); + if (architecture == "" || architecture == nil) + architecture = ProductCreator::GetArch (); + if (architecture != "x86_64") // all i[456]86 are i386... + architecture = "i386"; + image_architecture = architecture; return ReadImageTemplates (); } } Modified: trunk/product-creator/src/ProductCreator.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/ProductCreato... ============================================================================== --- trunk/product-creator/src/ProductCreator.ycp (original) +++ trunk/product-creator/src/ProductCreator.ycp Thu May 21 09:53:48 2009 @@ -435,7 +435,8 @@ return content_cache[srcid]:$[]; } - string content = Pkg::SourceProvideFile(srcid, 1, "content"); + // make content file optional (for empty repos, bnc#500527) + string content = Pkg::SourceProvideOptionalFile(srcid, 1, "content"); map<string,string> contentmap = (map<string,string>)SCR::Read(.content_file, content); if (contentmap == nil) contentmap = $[]; Modified: trunk/product-creator/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/complex.ycp?r... ============================================================================== --- trunk/product-creator/src/complex.ycp (original) +++ trunk/product-creator/src/complex.ycp Thu May 21 09:53:48 2009 @@ -261,10 +261,6 @@ y2error("unexpected retcode: %1", ret); continue; } - - if (ret == `kiwi) - { - } } return (symbol)ret; @@ -662,10 +658,15 @@ string name = config["name"]:d; // index by order, so we can handle more configs with same name Configurations[i] = config; + string unit = config["preferences",0,"size",0,"unit"]:"M"; + string i_size = get_preferences (config, "size", 0) + unit; + // with "additive", "size" has a different meaning + if (config["preferences",0,"size",0,"additive"]:"" == "true") + i_size = "+" + i_size; overview = add (overview, `item ( `id (i), name, get_preferences (config, "version", "1.0.0"), - get_preferences (config, "size", 0) + i_size )); i = i + 1; } Modified: trunk/product-creator/src/data/sysconfig.product-creator URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/data/sysconfi... ============================================================================== --- trunk/product-creator/src/data/sysconfig.product-creator (original) +++ trunk/product-creator/src/data/sysconfig.product-creator Thu May 21 09:53:48 2009 @@ -30,3 +30,15 @@ # # SUPPORTED_BOOT_IMAGES="" + +## Path: System/Yast2/Product-creator +## Description: YaST2 Product Creator +## Type: string(template) +## Default: none +# +# Default (preselected) architecture to build taget images for. If not specified, +# the default is the architeture of the build machine. +# Currently it has only sense to set "i386" on x86_64 machines. +# +# +DEFAULT_IMAGE_ARCHITECTURE="" Modified: trunk/product-creator/src/kiwi_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/kiwi_dialogs.... ============================================================================== --- trunk/product-creator/src/kiwi_dialogs.ycp (original) +++ trunk/product-creator/src/kiwi_dialogs.ycp Thu May 21 09:53:48 2009 @@ -9,6 +9,7 @@ { textdomain "product-creator"; + import "Arch"; import "CWM"; import "CWMTab"; import "Directory"; @@ -398,6 +399,14 @@ } /** + * initialize the value of 'additive' + */ + define void InitAdditiveCheckBox (string id) { + boolean additive = KiwiConfig["preferences",0,"size",0,"additive"]:"" == "true"; + UI::ChangeWidget (`id (id), `Value, additive); + } + + /** * initialize the value of version */ define void InitSize (string id) { @@ -412,7 +421,9 @@ define void StoreSize (string key, map event) { KiwiConfig["preferences",0,"size"] = [ $[ content_key : sformat ("%1", UI::QueryWidget(`id(key), `Value)), - "unit" : UI::QueryWidget (`id ("sizeunit"), `Value) + "unit" : UI::QueryWidget (`id ("sizeunit"), `Value), + "additive" : ((boolean) UI::QueryWidget (`id ("additive"), `Value)) + ? "true" : "false" ]]; } @@ -946,6 +957,47 @@ define boolean CreateImage (string key, map event) { if (event["ID"]:nil != `next) return true; + + // check the conflicts between packages selected and marked for deletion (fate#305254) + y2milestone ("checking list of selected packages..."); + map to_delete = $[]; + foreach (map pmap, KiwiConfig["packages"]:[], { + string type = pmap["type"]:""; + if (type == "delete") + { + to_delete = listmap (map pacmap, pmap["package"]:[], ``( + $[ pacmap["name"]:"" : true ]) + ); + } + }); + boolean conflicting = false; + if (size (to_delete) > 0) + { + foreach (map package, Pkg::ResolvableProperties("", `package, ""), { + if (conflicting) + break; + if (package["status"]:nil == `selected) + { + symbol transact_by = package["transact_by"]:`none; + string name = package["name"]:""; + if (transact_by == `solver || transact_by == `user) + { + if (haskey (to_delete, name)) + { + y2milestone ("packege %1 selected by %2 is present in the delete list", + name, transact_by); + conflicting = true; + } + } + } + }); + } + // yes/no popup + if (conflicting && !Popup::YesNo (_("Some of the packages that are selected for installation +are also included in the list for deletion. +Continue anyway?"))) + return false; + boolean ret = true; map question = $[ // popup question @@ -1201,6 +1253,14 @@ // FIXME check if boot directories match current product (-> enable building // for product different from installed one) } + else + { + // existing defaultdestination needs to be used as iso-dirctory as well + // (correct iso-directory was replaced on import (bnc#499489) + string dest = get_preferences (KiwiConfig, "defaultdestination", ""); + if (dest != "") + KiwiConfig["iso-directory"] = dest; + } boolean primary_included = false; string boot_dir = ""; // set the primary building target according to kiwi_task @@ -1306,7 +1366,11 @@ `VSpacing (0.2), `HBox ( `HWeight (2, `HBox ( - "version", "size", "sizeunit" + "version", "size", "sizeunit", + `VBox ( + `Label (""), + "additive" + ) )), `HWeight (1, "compression") ), @@ -1323,7 +1387,7 @@ ), `HSpacing(1)), "widget_names" : [ "version", - "size", "sizeunit", "compression", + "size", "sizeunit", "additive", "compression", "sw_selection", "rt_sw", "configure_sw", "delete_sw", @@ -1511,15 +1575,19 @@ ], "sizeunit" : $[ "widget" : `combobox, - // textentry label + // combo box label (MB/GB values) "label" : _("&Unit"), "no_help" : true, "items" : [], "init" : InitSizeUnitCombo, - /* - "store" : StoreGeneric, - "handle" : HandleGeneric, - */ + // stored and handled by "size" + ], + "additive" : $[ + "widget" : `checkbox, + // check box label + "label" : _("Additive"), + "no_help" : true,// FIXME the meaning of size is different...! + "init" : InitAdditiveCheckBox, ], // ---------------- widgtes for directory structure "general_scripts" : $[ @@ -2009,10 +2077,22 @@ list template_items = maplist (string dir, map template, Kiwi::Templates, { return `item (`id (dir), sformat ( // combo box item, %1 is name, %2 version - _("%1, version %2"), template["name"]:"", template["version"]:"") + _("%1, version %2"), template["name"]:"", get_preferences (template, "version", "")) ); }); + term arch_term = `VBox (); + + if (Arch::architecture () == "x86_64") + { + arch_term = `VBox ( + // checkbox label + `CheckBox (`id (`i386), `opt (`hstretch), _("&32bit Architecture Image"), + Kiwi::image_architecture == "i386"), + `VSpacing (0.2) + ); + } + term contents = `VBox ( new_configuration ? `VBox ( @@ -2062,6 +2142,7 @@ ) ), `VSpacing (0.2), + arch_term, `Table (`id(`repositories), `opt (`notify), `header ( // table header _("Package Repository")) @@ -2290,6 +2371,16 @@ list<string> failed_repositories = []; map<string,map> new_repositories = $[]; + + ProductCreator::ResetArch(); + + if (Arch::architecture () == "x86_64" && + UI::QueryWidget (`id (`i386), `Value) == true) + { + Kiwi::image_architecture = "i386"; + ProductCreator::SetPackageArch ("i386"); + } + if (size (repositories) > 0) { map<string,integer> current_sources = $[]; @@ -2306,8 +2397,12 @@ url = "dir://" + url; if (haskey (current_sources, url)) { +// integer srcid = current_sources[url]:-1; current_sources = remove (current_sources, url); return true; + // TODO is it correct to check architecture now? + // but why not to list repositories that won't be used... +// return CheckArchitecture (srcid); } integer source_ret = -1; string full_url = url; @@ -2322,7 +2417,13 @@ failed_repositories = add (failed_repositories, url); return false; } - else return true; + return true; + /* see above... + if (CheckArchitecture (source_ret)) + return true; + else + return false; + */ }); foreach (string url, integer srcid, current_sources, { Pkg::SourceDelete (srcid); -- 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