[yast-commit] r57272 - in /branches/SuSE-Code-11-Branch/product-creator: ./ package/ src/ src/data/ src/data/kiwi_templates/iso/

Author: jsuchome Date: Thu May 21 00:09:35 2009 New Revision: 57272 URL: http://svn.opensuse.org/viewcvs/yast?rev=57272&view=rev Log: - added openssl-certs to default bootstrap section, so Update repos can work (bnc#491475) - look primary into base product for isolinux.cfg (bnc#496263) - read the configured architecture with GetArch, which merges i586 and i686 to i386 (bnc#464727) - 2.17.18 Modified: branches/SuSE-Code-11-Branch/product-creator/MAINTAINER branches/SuSE-Code-11-Branch/product-creator/VERSION branches/SuSE-Code-11-Branch/product-creator/package/yast2-product-creator.changes branches/SuSE-Code-11-Branch/product-creator/src/Kiwi.ycp branches/SuSE-Code-11-Branch/product-creator/src/ProductCreator.ycp branches/SuSE-Code-11-Branch/product-creator/src/complex.ycp branches/SuSE-Code-11-Branch/product-creator/src/data/kiwi_templates/iso/config.xml branches/SuSE-Code-11-Branch/product-creator/src/data/sysconfig.product-creator branches/SuSE-Code-11-Branch/product-creator/src/kiwi_dialogs.ycp Modified: branches/SuSE-Code-11-Branch/product-creator/MAINTAINER URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/product-cr... ============================================================================== --- branches/SuSE-Code-11-Branch/product-creator/MAINTAINER (original) +++ branches/SuSE-Code-11-Branch/product-creator/MAINTAINER Thu May 21 00:09:35 2009 @@ -1 +1 @@ -Ladislav Slezak <lslezak@suse.cz> +Jiri Suchomel <jsuchome@suse.cz> Modified: branches/SuSE-Code-11-Branch/product-creator/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/product-cr... ============================================================================== --- branches/SuSE-Code-11-Branch/product-creator/VERSION (original) +++ branches/SuSE-Code-11-Branch/product-creator/VERSION Thu May 21 00:09:35 2009 @@ -1 +1 @@ -2.17.17 +2.17.18 Modified: branches/SuSE-Code-11-Branch/product-creator/package/yast2-product-creator.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/product-cr... ============================================================================== --- branches/SuSE-Code-11-Branch/product-creator/package/yast2-product-creator.changes (original) +++ branches/SuSE-Code-11-Branch/product-creator/package/yast2-product-creator.changes Thu May 21 00:09:35 2009 @@ -1,4 +1,53 @@ ------------------------------------------------------------------- +Wed May 20 23:21:19 CEST 2009 - jsuchome@suse.cz + +- added openssl-certs to default bootstrap section, so Update repos + can work (bnc#491475) +- look primary into base product for isolinux.cfg (bnc#496263) +- read the configured architecture with GetArch, which merges + i586 and i686 to i386 (bnc#464727) +- 2.17.18 + +------------------------------------------------------------------- +Thu May 14 11:59:26 CEST 2009 - jsuchome@suse.cz + +- read the whole kiwi process output (bnc#488799) + +------------------------------------------------------------------- +Wed May 13 11:56:52 CEST 2009 - jsuchome@suse.cz + +- make content file optional (for empty repos, bnc#500527) + +------------------------------------------------------------------- +Wed May 6 11:15:17 CEST 2009 - jsuchome@suse.cz + +- correct check for configuration type and version in templates + (bnc#498439) +- during configuration, do not throw away target image desctination + (bnc#499489) + +------------------------------------------------------------------- +Tue Apr 7 11:38:45 CEST 2009 - jsuchome@suse.cz + +- updated sysconfig template (DEFAULT_IMAGE_ARCHITECTURE) + +------------------------------------------------------------------- +Thu Apr 2 14:33:57 CEST 2009 - jsuchome@suse.cz + +- added option to specify "additive" attribute to size (fate#305327) + +------------------------------------------------------------------- +Wed Mar 25 14:47:40 CET 2009 - jsuchome@suse.cz + +- detect and report conflicts in selected and deleted package lists + (fate#305254) + +------------------------------------------------------------------- +Thu Mar 19 10:47:18 CET 2009 - jsuchome@suse.cz + +- allow building i386 images on x86_64 system (fate#305327) + +------------------------------------------------------------------- Thu Mar 12 12:31:54 CET 2009 - jsuchome@suse.cz - escape URL of base product when saving to XML (bnc#482395) Modified: branches/SuSE-Code-11-Branch/product-creator/src/Kiwi.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/product-cr... ============================================================================== --- branches/SuSE-Code-11-Branch/product-creator/src/Kiwi.ycp (original) +++ branches/SuSE-Code-11-Branch/product-creator/src/Kiwi.ycp Thu May 21 00:09:35 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: branches/SuSE-Code-11-Branch/product-creator/src/ProductCreator.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/product-cr... ============================================================================== --- branches/SuSE-Code-11-Branch/product-creator/src/ProductCreator.ycp (original) +++ branches/SuSE-Code-11-Branch/product-creator/src/ProductCreator.ycp Thu May 21 00:09:35 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 = $[]; @@ -695,13 +696,19 @@ if (arch == "s390_64") arch = "s390x"; bootconfig_path = sformat("boot/%1/loader/isolinux.cfg", arch); - list<integer> srcids = [checkProductDependency()]; + + list<integer> srcids = []; + // bnc#496263 + if (Config["base_repo"]:"" == "") + srcids = [checkProductDependency()]; + else + srcids = UrlToId ([Config["base_repo"]:""]); foreach(integer srcid, srcids, { y2milestone("Downloading %1 from source %2", bootconfig_path, srcid); bootconfig_path = Pkg::SourceProvideOptionalFile(srcids[0]:0, 1, bootconfig_path); - y2debug("bootconfig_path: %1", bootconfig_path); + y2debug ("bootconfig_path: %1", bootconfig_path); if (bootconfig_path == nil) { Modified: branches/SuSE-Code-11-Branch/product-creator/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/product-cr... ============================================================================== --- branches/SuSE-Code-11-Branch/product-creator/src/complex.ycp (original) +++ branches/SuSE-Code-11-Branch/product-creator/src/complex.ycp Thu May 21 00:09:35 2009 @@ -64,7 +64,7 @@ // needed for creating kiwi images because kiwi cannot create cross-architecture images boolean SameArchitecture() { - string arch = ProductCreator::Config["arch"]:""; + string arch = ProductCreator::GetArch (); string sysarch = Arch::architecture(); // is the target architecture different than the machine architecture? @@ -257,10 +257,6 @@ y2error("unexpected retcode: %1", ret); continue; } - - if (ret == `kiwi) - { - } } return (symbol)ret; @@ -658,10 +654,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: branches/SuSE-Code-11-Branch/product-creator/src/data/kiwi_templates/iso/config.xml URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/product-cr... ============================================================================== --- branches/SuSE-Code-11-Branch/product-creator/src/data/kiwi_templates/iso/config.xml (original) +++ branches/SuSE-Code-11-Branch/product-creator/src/data/kiwi_templates/iso/config.xml Thu May 21 00:09:35 2009 @@ -30,6 +30,7 @@ <package name="glibc-locale"/> <package name="kernel-default"/> <package name="udev"/> + <package name="openssl-certs"/> </packages> <split> <temporary> Modified: branches/SuSE-Code-11-Branch/product-creator/src/data/sysconfig.product-creator URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/product-cr... ============================================================================== --- branches/SuSE-Code-11-Branch/product-creator/src/data/sysconfig.product-creator (original) +++ branches/SuSE-Code-11-Branch/product-creator/src/data/sysconfig.product-creator Thu May 21 00:09:35 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: branches/SuSE-Code-11-Branch/product-creator/src/kiwi_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/product-cr... ============================================================================== --- branches/SuSE-Code-11-Branch/product-creator/src/kiwi_dialogs.ycp (original) +++ branches/SuSE-Code-11-Branch/product-creator/src/kiwi_dialogs.ycp Thu May 21 00:09:35 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 @@ -1305,7 +1365,11 @@ `VSpacing (0.2), `HBox ( `HWeight (2, `HBox ( - "version", "size", "sizeunit" + "version", "size", "sizeunit", + `VBox ( + `Label (""), + "additive" + ) )), `HWeight (1, "compression") ), @@ -1322,7 +1386,7 @@ ), `HSpacing(1)), "widget_names" : [ "version", - "size", "sizeunit", "compression", + "size", "sizeunit", "additive", "compression", "sw_selection", "rt_sw", "configure_sw", "delete_sw", @@ -1510,15 +1574,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" : $[ @@ -2008,10 +2076,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 ( @@ -2061,6 +2141,7 @@ ) ), `VSpacing (0.2), + arch_term, `Table (`id(`repositories), `opt (`notify), `header ( // table header _("Package Repository")) @@ -2289,6 +2370,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 = $[]; @@ -2305,8 +2396,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; @@ -2321,7 +2416,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