Author: jsuchome
Date: Tue May 24 10:38:26 2011
New Revision: 64096
URL: http://svn.opensuse.org/viewcvs/yast?rev=64096&view=rev
Log:
- updated to new kiwi version (fate#311430 "Update kiwi to 4.8")
- 2.17.40
Modified:
branches/SuSE-Code-11-SP2-Branch/product-creator/VERSION
branches/SuSE-Code-11-SP2-Branch/product-creator/package/yast2-product-creator.changes
branches/SuSE-Code-11-SP2-Branch/product-creator/src/Kiwi.ycp
branches/SuSE-Code-11-SP2-Branch/product-creator/src/complex.ycp
branches/SuSE-Code-11-SP2-Branch/product-creator/src/data/kiwi_templates/iso/config.xml
branches/SuSE-Code-11-SP2-Branch/product-creator/src/data/kiwi_templates/xen/config.xml
branches/SuSE-Code-11-SP2-Branch/product-creator/src/kiwi_dialogs.ycp
branches/SuSE-Code-11-SP2-Branch/product-creator/src/routines.ycp
Modified: branches/SuSE-Code-11-SP2-Branch/product-creator/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/product-creator/VERSION?rev=64096&r1=64095&r2=64096&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/product-creator/VERSION (original)
+++ branches/SuSE-Code-11-SP2-Branch/product-creator/VERSION Tue May 24 10:38:26 2011
@@ -1 +1 @@
-2.17.39
+2.17.40
Modified: branches/SuSE-Code-11-SP2-Branch/product-creator/package/yast2-product-creator.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/product-creator/package/yast2-product-creator.changes?rev=64096&r1=64095&r2=64096&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/product-creator/package/yast2-product-creator.changes (original)
+++ branches/SuSE-Code-11-SP2-Branch/product-creator/package/yast2-product-creator.changes Tue May 24 10:38:26 2011
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed May 18 12:42:05 CEST 2011 - jsuchome@suse.cz
+
+- updated to new kiwi version (fate#311430 "Update kiwi to 4.8")
+- 2.17.40
+
+-------------------------------------------------------------------
Tue Apr 26 10:50:33 CEST 2011 - jsuchome@suse.cz
- better UI for locale related settings (fate#311734)
Modified: branches/SuSE-Code-11-SP2-Branch/product-creator/src/Kiwi.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/product-creator/src/Kiwi.ycp?rev=64096&r1=64095&r2=64096&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/product-creator/src/Kiwi.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/product-creator/src/Kiwi.ycp Tue May 24 10:38:26 2011
@@ -233,10 +233,22 @@
y2warning ("no such file %1/config.xml", base_path);
return ret;
}
+ string file_path = base_path + "/config.xml";
+ if (FileUtils::Exists ("/usr/share/kiwi/xsl/master.xsl"))
+ {
+ file_path = Directory::tmpdir + "/transformed-config.xml";
+ map out = (map) SCR::Execute (.target.bash_output, sformat (
+ "xsltproc /usr/share/kiwi/xsl/master.xsl %1/config.xml > %2",
+ base_path, file_path));
+ if (out["exit"]:0 != 0)
+ {
+ y2error ("xslt transformation failed: %1", out);
+ }
+ }
// read rest of config.xml using more generic agent
map anyxml = (map) SCR::Read (.anyxml, $[
- "file" : base_path + "/config.xml",
+ "file" : file_path,
"args" : $[
"ForceArray" : 1,
"KeepRoot" : 1,
@@ -249,7 +261,7 @@
// attributes of 'image' tag:
ret["name"] = image["name"]:"";
- ret["schemeversion"]= image["schemeversion"]:"2.0";
+ ret["schemaversion"]= image["schemaversion"]:"5.2";
if (haskey (image, "inherit"))
ret["inherit"] = image["inherit"]:"";
@@ -289,7 +301,6 @@
list<string> split = splitstring (lang, ".");
ret = save_preferences (ret, "locale", split[0]:lang);
}
-
return ret;
}
@@ -310,8 +321,8 @@
KiwiConfig = save_preferences(KiwiConfig,"defaultroot",chroot_dir);
}
- string image_tag = sformat ("",
- KiwiConfig["name"]:"", KiwiConfig["schemeversion"]:"2.0",
+ string image_tag = sformat ("",
+ KiwiConfig["name"]:"", KiwiConfig["schemaversion"]:"5.2",
(KiwiConfig["inherit"]:"" == "" ?
"" :
sformat (" inherit=\"%1\"", KiwiConfig["inherit"]:"")
Modified: branches/SuSE-Code-11-SP2-Branch/product-creator/src/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/product-creator/src/complex.ycp?rev=64096&r1=64095&r2=64096&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/product-creator/src/complex.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/product-creator/src/complex.ycp Tue May 24 10:38:26 2011
@@ -693,10 +693,12 @@
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;
+ map size_map = get_current_size_map (config, task);
+ string unit = size_map["unit"]:"M";
+ string i_size = size_map[Kiwi::content_key]:"0" + unit;
+
// with "additive", "size" has a different meaning
- if (config["preferences",0,"size",0,"additive"]:"" == "true")
+ if (size_map["additive"]:"" == "true")
i_size = "+" + i_size;
overview = add (overview, `item (
`id (i), name,
Modified: branches/SuSE-Code-11-SP2-Branch/product-creator/src/data/kiwi_templates/iso/config.xml
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/product-creator/src/data/kiwi_templates/iso/config.xml?rev=64096&r1=64095&r2=64096&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/product-creator/src/data/kiwi_templates/iso/config.xml (original)
+++ branches/SuSE-Code-11-SP2-Branch/product-creator/src/data/kiwi_templates/iso/config.xml Tue May 24 10:38:26 2011
@@ -1,44 +1,43 @@
-<?xml version="1.0"?>
-<image schemeversion="2.0" name="kiwi-image-template">
- <description type="system">
- <author></author>
- <contact></contact>
- <specification>Template for system image configuration</specification>
- </description>
- <preferences>
- <type primary="true" boot="isoboot/suse-SLES11" flags="compressed">iso</type>
- <type boot="vmxboot/suse-SLES11" filesystem="ext3" format="vmdk">vmx</type>
- <type boot="usbboot/suse-SLES11" filesystem="ext3">usb</type>
- <type boot="xenboot/suse-SLES11" filesystem="ext3">xen</type>
- <type boot="oemboot/suse-SLES11" filesystem="ext3" flags="unified">oem</type>
- <version>1.0.0</version>
- <size unit="M">2000</size>
- <packagemanager>zypper</packagemanager>
- <rpm-check-signatures>False</rpm-check-signatures>
- <rpm-force>False</rpm-force>
- <locale>en_US</locale>
- </preferences>
- <users group="users">
- <user name="linux" pwd="" home="/home/linux" realname="Live-CD User"/>
- <user name="root" pwd="" home="/root"/>
- </users>
- <packages type="image" patternType="plusRecommended" patternPackageType="plusRecommended">
- <opensusePattern name="Minimal"/>
- </packages>
- <packages type="bootstrap">
- <package name="filesystem"/>
- <package name="glibc-locale"/>
- <package name="kernel-default"/>
- <package name="udev"/>
- <package name="openssl-certs"/>
- </packages>
- <split>
- <temporary>
- <!-- allow read/write access to: -->
- <file name="/var"/>
- <file name="/var/*"/>
- <file name="/etc"/>
- <file name="/etc/*"/>
- </temporary>
- </split>
+<?xml version="1.0" encoding="utf-8"?>
+
+<image schemaversion="5.2" name="kiwi-image-template">
+ <description type="system">
+ <author/>
+ <contact/>
+ <specification>Template for system image configuration</specification>
+ </description>
+ <preferences>
+ <type image="iso" primary="true" boot="isoboot/suse-SLES11" flags="compressed">
+ <size unit="M">2000</size>
+ </type>
+ <type image="vmx" boot="vmxboot/suse-SLES11" filesystem="ext3" format="vmdk">
+ <size unit="M">2000</size>
+ </type>
+ <type image="usb" boot="usbboot/suse-SLES11" filesystem="ext3">
+ <size unit="M">2000</size>
+ </type>
+ <type boot="vmxboot/suse-SLES11" filesystem="ext3" image="vmx" bootkernel="xenk" bootprofile="xen">2000</type>
+ <type image="oem" boot="oemboot/suse-SLES11" filesystem="ext3" flags="unified">
+ <size unit="M">2000</size>
+ </type>
+ <version>1.0.0</version>
+ <packagemanager>zypper</packagemanager>
+ <rpm-check-signatures>false</rpm-check-signatures>
+ <rpm-force>false</rpm-force>
+ <locale>en_US</locale>
+ </preferences>
+ <users group="users">
+ <user name="linux" pwd="" home="/home/linux" realname="Live-CD User"/>
+ <user name="root" pwd="" home="/root"/>
+ </users>
+ <packages type="image" patternType="plusRecommended">
+ <opensusePattern name="Minimal"/>
+ </packages>
+ <packages type="bootstrap">
+ <package name="filesystem"/>
+ <package name="glibc-locale"/>
+ <package name="kernel-default"/>
+ <package name="udev"/>
+ <package name="openssl-certs"/>
+ </packages>
</image>
Modified: branches/SuSE-Code-11-SP2-Branch/product-creator/src/data/kiwi_templates/xen/config.xml
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/product-creator/src/data/kiwi_templates/xen/config.xml?rev=64096&r1=64095&r2=64096&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/product-creator/src/data/kiwi_templates/xen/config.xml (original)
+++ branches/SuSE-Code-11-SP2-Branch/product-creator/src/data/kiwi_templates/xen/config.xml Tue May 24 10:38:26 2011
@@ -1,31 +1,31 @@
-<?xml version="1.0"?>
-<image schemeversion="2.0" name="kiwi-xen-image-template">
+<?xml version="1.0" encoding="utf-8"?>
+
+<image schemaversion="5.2" name="kiwi-xen-image-template">
<description type="system">
- <author></author>
- <contact></contact>
+ <author/>
+ <contact/>
<specification>Template for system image configuration</specification>
</description>
<preferences>
- <type boot="xenboot/suse-SLES11" filesystem="ext3">xen</type>
+ <type boot="vmxboot/suse-SLES11" filesystem="ext3" image="vmx" bootkernel="xenk" bootprofile="xen">2000</type>
<version>1.0.0</version>
- <size unit="M">2000</size>
<packagemanager>zypper</packagemanager>
- <rpm-check-signatures>False</rpm-check-signatures>
- <rpm-force>True</rpm-force>
+ <rpm-check-signatures>false</rpm-check-signatures>
+ <rpm-force>true</rpm-force>
</preferences>
<users group="users">
- <user home="/home/linux" name="linux"/>
- <user home="/root" name="root"/>
+ <user home="/home/linux" name="linux"/>
+ <user home="/root" name="root"/>
</users>
<packages type="image">
- <package name="OpenIPMI"/>
+ <package name="OpenIPMI"/>
<package name="lvm2"/>
<package name="aaa_base"/>
<package name="aaa_skel"/>
<package name="acl"/>
<package name="acpid"/>
<package name="attr"/>
- <!-- for x86_64 only -->
+<!-- for x86_64 only -->
<package name="linux32" arch="x86_64"/>
<package name="bash"/>
<package name="bc"/>
@@ -167,7 +167,7 @@
<package name="portmap"/>
<package name="cron"/>
</packages>
- <packages type="xen" memory="512" disk="/dev/sda">
+ <packages type="xen">
<package name="kernel-xen"/>
<package name="xen"/>
</packages>
Modified: branches/SuSE-Code-11-SP2-Branch/product-creator/src/kiwi_dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/product-creator/src/kiwi_dialogs.ycp?rev=64096&r1=64095&r2=64096&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/product-creator/src/kiwi_dialogs.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/product-creator/src/kiwi_dialogs.ycp Tue May 24 10:38:26 2011
@@ -73,7 +73,7 @@
string current_method = "none";
foreach (map typemap, (list<map>)KiwiConfig["preferences",0,"type"]:[], {
- if (typemap[content_key]:"" == kiwi_task)
+ if (typemap["image"]:"" == kiwi_task)
{
current_method = typemap["flags"]:current_method;
}
@@ -98,7 +98,7 @@
KiwiConfig["preferences",0,"type"] = maplist (map typemap,
(list<map>)KiwiConfig["preferences",0,"type"]:[],
{
- if (typemap[content_key]:"" == kiwi_task)
+ if (typemap["image"]:"" == kiwi_task)
{
if (selected == "none")
{
@@ -361,29 +361,6 @@
}
/**
- * initialize the value of compress checkbox
- */
- define void InitCompressCheckBox (string id) {
- UI::ChangeWidget (`id (id), `Enabled, false);
- UI::ChangeWidget (`id (id), `Value, KiwiConfig["compressed"]:false);
- }
-
- /**
- * store the value of compress checkbox
- */
- define void StoreCompressCheckBox (string key, map event) {
- KiwiConfig["compressed"] = (boolean) UI::QueryWidget(`id(key), `Value);
- }
- /**
- * handler for compress checkbox
- */
- define symbol HandleCompressCheckBox (string key, map event) {
- // store the value on exiting
- if (event["ID"]:nil == `next) StoreCompressCheckBox (key, event);
- return nil;
- }
-
- /**
* initialize the value of version
*/
define void InitVersion (string id) {
@@ -411,42 +388,40 @@
}
/**
- * initialize the value of size unit
+ * initialize the values of "size", "sizeunit" and "additive" widgets
*/
- define void InitSizeUnitCombo (string id) {
- string unit = KiwiConfig["preferences",0,"size",0,"unit"]:"M";
- UI::ChangeWidget (`id (id), `Items, maplist (string u, [ "M", "G" ], ``(
- `item (`id (u), u + "B", unit == u))
- ));
- }
+ define void InitSize (string id) {
- /**
- * 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);
- }
+ map size_map = get_current_size_map (KiwiConfig, kiwi_task);
- /**
- * initialize the value of version
- */
- define void InitSize (string id) {
- integer siz = tointeger (get_preferences (KiwiConfig, "size", "2000"));
- if (siz == nil) siz = 2000;
- UI::ChangeWidget (`id (id), `Value, siz);
+ integer siz = tointeger (size_map[Kiwi::content_key]:"0");
+ if (siz == nil) siz = 0;
+ UI::ChangeWidget (`id ("size"), `Value, siz);
+ UI::ChangeWidget (`id ("additive"), `Value, size_map["additive"]:"" == "true");
+ UI::ChangeWidget (`id ("sizeunit"), `Items, maplist (string u, [ "M", "G" ], ``(
+ `item (`id (u), u + "B", size_map["unit"]:"M" == u))
+ ));
}
/**
- * store the size value
+ * store the values of "size", "sizeunit" and "additive" widgets
*/
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),
- "additive" : ((boolean) UI::QueryWidget (`id ("additive"), `Value))
- ? "true" : "false"
- ]];
+
+ KiwiConfig["preferences",0,"type"] = maplist (map typemap,
+ (list<map>)KiwiConfig["preferences",0,"type"]:[],
+ {
+ if (typemap["image"]:"" == kiwi_task)
+ {
+ typemap["size"] = [ $[
+ content_key : sformat ("%1", UI::QueryWidget(`id(key), `Value)),
+ "unit" : UI::QueryWidget (`id ("sizeunit"), `Value),
+ "additive" : ((boolean) UI::QueryWidget (`id ("additive"), `Value)) ? "true" : "false",
+ ] ];
+ }
+ return typemap;
+ });
+
}
/**
@@ -1322,22 +1297,10 @@
if (FileUtils::CheckAndCreatePath (out_dir) &&
Kiwi::PrepareAndCreate (out_dir, selected_profiles))
{
- if (kiwi_task == "usb" && false)
- {
- // additional question (yes/no)
- if (Popup::YesNo (sformat (success[kiwi_task]:"", out_dir) + _("
-Save the image to the stick now?")))
- {
- NotImplementedHandler ("", $[ "ID" : ""]);
- }
- }
- else
- {
- // default popup message, %1 is a dir
- Popup::Message (sformat (success[kiwi_task]:_("Image successfully created in
+ // default popup message, %1 is a dir
+ Popup::Message (sformat (success[kiwi_task]:_("Image successfully created in
%1
directory."), out_dir));
- }
}
else
{
@@ -1505,8 +1468,8 @@
KiwiConfig["preferences",0,"type"] = maplist (
map typemap, (list<map>)pref[0,"type"]:[],
{
- string type = typemap[content_key]:"";
- if (typemap["primary"]:"false" == "true" && type != kiwi_task)
+ string type = typemap["image"]:"";
+ if (tolower (typemap["primary"]:"false") == "true" && type != kiwi_task)
typemap = remove (typemap, "primary");
else if (type == kiwi_task)
{
@@ -1530,7 +1493,7 @@
map def_map = Kiwi::ReadConfigXML (default_dir);
foreach (map typemap, (list<map>)def_map["preferences",0,"type"]:[],
{
- if (typemap[content_key]:"" == kiwi_task)
+ if (typemap["image"]:"" == kiwi_task)
{
KiwiConfig["preferences",0,"type"] = add (
KiwiConfig["preferences",0,"type"]:[], typemap);
@@ -1598,7 +1561,7 @@
// compression not allowed in most cases (bnc#510833)
foreach (map typemap, (list<map>)KiwiConfig["preferences",0,"type"]:[], {
- if (typemap[content_key]:"" == kiwi_task)
+ if (typemap["image"]:"" == kiwi_task)
{
if (typemap["filesystem"]:"" == "ext3")
show_compression = false;
@@ -1738,16 +1701,6 @@
"validate_function" : CreateImage,
"no_help" : true,
],
- // widgets for config.xml tab
- "compressed" : $[
- "widget" : `checkbox,
- // textentry label
- "label" : _("Co&mpress"),
- "help" : _("<p>Check <b>Compress</b> if the final image should be based \non the squashfs compressed file system."),
- "init" : InitCompressCheckBox,
- "store" : StoreCompressCheckBox,
- "handle" : HandleCompressCheckBox,
- ],
"compression" : $[
"widget" : `combobox,
"opt" : [ `hstretch, `notify ],
@@ -1833,7 +1786,6 @@
"label" : _("&Unit"),
"no_help" : true,
"items" : [],
- "init" : InitSizeUnitCombo,
// stored and handled by "size"
],
"additive" : $[
@@ -1841,7 +1793,6 @@
// check box label
"label" : _("Additive"),
"no_help" : true,
- "init" : InitAdditiveCheckBox,
],
// ---------------- widgtes for directory structure
"general_scripts" : $[
@@ -2259,7 +2210,7 @@
list type_its = [];
//solve `back here (=no import)
foreach (map typemap, (list<map>) Config["preferences",0,"type"]:[], {
- string type = typemap[content_key]:"";
+ string type = typemap["image"]:"";
type_its = add (type_its,
`item (`id (type), task2label[type]:type, type == kiwi_task));
});
@@ -2334,8 +2285,8 @@
kiwi_task = "";
foreach (map typemap, (list<map>) Config["preferences",0,"type"]:[], {
- string type = typemap[content_key]:"";
- if (typemap["primary"]:"false" == "true" || kiwi_task == "")
+ string type = typemap["image"]:"";
+ if (tolower (typemap["primary"]:"false") == "true" || kiwi_task == "")
kiwi_task = type;
if ((supported_images == "" && !contains (present_types, type)) ||
supported_images == "template")
Modified: branches/SuSE-Code-11-SP2-Branch/product-creator/src/routines.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/product-creator/src/routines.ycp?rev=64096&r1=64095&r2=64096&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/product-creator/src/routines.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/product-creator/src/routines.ycp Tue May 24 10:38:26 2011
@@ -41,10 +41,10 @@
string task = "";
foreach (map typemap, (list<map>) config["preferences",0,"type"]:[], {
if (task == "") // take the 1st one if none is default
- task = typemap[Kiwi::content_key]:task;
- if (typemap["primary"]:"false" == "true")
+ task = typemap["image"]:task;
+ if (tolower (typemap["primary"]:"false") == "true")
{
- task = typemap[Kiwi::content_key]:task;
+ task = typemap["image"]:task;
break;
}
});
@@ -55,12 +55,24 @@
return task;
}
+// return the size info for current image type
+map get_current_size_map (map config, string task) {
+
+ map ret = $[];
+ foreach (map typemap, (list<map>) config["preferences",0,"type"]:[], {
+ if (task == typemap["image"]:"")
+ ret = typemap["size",0]:$[];
+ });
+ return ret;
+}
+
+
// get the value of boot image directory
string get_bootdir (map config, string task) {
string dir = "";
foreach (map typemap, (list<map>) config["preferences",0,"type"]:[], {
- if (task == typemap[Kiwi::content_key]:"")
+ if (task == typemap["image"]:"")
{
dir = typemap["boot"]:"";
break;
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org