Author: jsuchome
Date: Thu Nov 1 16:23:02 2007
New Revision: 41716
URL: http://svn.opensuse.org/viewcvs/yast?rev=41716&view=rev
Log:
- fixed checking if repository has 'plaindir' format (#338115)
- show which repositories YaST failed to add (#337618)
- added support for "format" and "locale" tags in config.xml
- added support for OEM image type
- call kiwi with --nocolor to shorten the output
- 2.16.4
Modified:
trunk/product-creator/VERSION
trunk/product-creator/agent-kiwi/ag_kiwi
trunk/product-creator/package/yast2-product-creator.changes
trunk/product-creator/src/Kiwi.ycp
trunk/product-creator/src/complex.ycp
trunk/product-creator/src/kiwi_dialogs.ycp
Modified: trunk/product-creator/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/VERSION?rev=41716&r1=41715&r2=41716&view=diff
==============================================================================
--- trunk/product-creator/VERSION (original)
+++ trunk/product-creator/VERSION Thu Nov 1 16:23:02 2007
@@ -1 +1 @@
-2.16.3
+2.16.4
Modified: trunk/product-creator/agent-kiwi/ag_kiwi
URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/agent-kiwi/ag_kiwi?rev=41716&r1=41715&r2=41716&view=diff
==============================================================================
--- trunk/product-creator/agent-kiwi/ag_kiwi (original)
+++ trunk/product-creator/agent-kiwi/ag_kiwi Thu Nov 1 16:23:02 2007
@@ -70,12 +70,9 @@
# <type boot="vmxboot/suse-10.3" filesystem="ext3">vmx</type>
my @ntag = $prefs -> getElementsByTagName ("type") -> get_nodelist();
foreach my $element (@ntag) {
- my $primary = $element -> getAttribute ("primary");
- my $boot = $element -> getAttribute ("boot");
- my $flags = $element -> getAttribute ("flags");
my $type = $element -> textContent ();
my %typemap = ();
- foreach my $attr ("primary", "boot", "flags", "filesystem") {
+ foreach my $attr ("primary", "boot", "flags", "filesystem", "format") {
my $val = $element -> getAttribute ($attr);
$typemap{$attr} = $val if defined $val;
}
Modified: trunk/product-creator/package/yast2-product-creator.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/package/yast2-product-creator.changes?rev=41716&r1=41715&r2=41716&view=diff
==============================================================================
--- trunk/product-creator/package/yast2-product-creator.changes (original)
+++ trunk/product-creator/package/yast2-product-creator.changes Thu Nov 1 16:23:02 2007
@@ -1,4 +1,14 @@
-------------------------------------------------------------------
+Thu Nov 1 11:01:12 CET 2007 - jsuchome@suse.cz
+
+- fixed checking if repository has 'plaindir' format (#338115)
+- show which repositories YaST failed to add (#337618)
+- added support for "format" and "locale" tags in config.xml
+- added support for OEM image type
+- call kiwi with --nocolor to shorten the output
+- 2.16.4
+
+-------------------------------------------------------------------
Mon Oct 29 11:13:16 CET 2007 - jsuchome@suse.cz
- package kernel-bigsmp has been renamed to kernel-pae
Modified: trunk/product-creator/src/Kiwi.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/Kiwi.ycp?rev=41716&r1=41715&r2=41716&view=diff
==============================================================================
--- trunk/product-creator/src/Kiwi.ycp (original)
+++ trunk/product-creator/src/Kiwi.ycp Thu Nov 1 16:23:02 2007
@@ -154,25 +154,47 @@
return deletechars (name, " \t");
}
+
/**
- * generate the value for image type
+ * generate the values for image type
*/
- map get_type_value (map config, string task) {
+ list<map> get_type_values (map config, string task) {
string boot_image = sformat ("%1boot/%2", task, config[task + "boot"]:"suse-10.2");
- if (config["type",task,"boot"]:"" != "")
- boot_image = config["type",task,"boot"]:"";
- map ret = $[
- "__key" : "type",
- "__value" : task,
- "primary" : "true",
- "boot" : boot_image,
- ];
- if (task != "iso")
- ret["filesystem"] = config["type",task,"filesystem"]:"ext3";
- if (config["type",task,"flags"]:"" != "")
- ret["flags"] = config["type",task,"flags"]:"";
- return ret;
+ list<map> retlist = maplist (
+ string type, map typemap, (map)config["type"]:$[], {
+
+ if (typemap["boot"]:"" != "")
+ boot_image = typemap["boot"]:"";
+
+ map ret = $[
+ "__key" : "type",
+ "__value" : type,
+ "boot" : boot_image,
+ ];
+ if (type != "iso")
+ ret["filesystem"] = typemap["filesystem"]:"ext3";
+ if (typemap["flags"]:"" != "")
+ ret["flags"] = typemap["flags"]:"";
+ if (typemap["format"]:"" != "")
+ ret["format"] = typemap["format"]:"";
+ if (type == task)
+ ret["primary"] = "true";
+ return ret;
+ });
+ if (retlist == [])
+ {
+ map ret = $[
+ "__key" : "type",
+ "__value" : task,
+ "boot" : boot_image,
+ "primary" : "true"
+ ];
+ if (task != "iso")
+ ret["filesystem"] = "ext3";
+ retlist = [ ret ];
+ }
+ return retlist;
}
/**
@@ -287,7 +309,7 @@
foreach (string key, [ "author", "contact", "specification",
"packagemanager", "version", "rpm-check-signatures", "rpm-force",
"sizeunit", "type", "name", "repository", "defaultdestination",
- "schemeversion", "defaultroot", "inherit"],
+ "schemeversion", "defaultroot", "inherit", "locale"],
{
if (config[key]:nil != nil)
ret[key] = config[key]:nil;
@@ -400,7 +422,6 @@
map preferences = $[
"__key" : "preferences",
"__children" : [
- get_type_value (KiwiConfig, task),
$[
"__key" : "version",
"__value" : KiwiConfig["version"]:"1",
@@ -428,6 +449,10 @@
],
],
];
+ foreach (map typemap, get_type_values (KiwiConfig, task), {
+ preferences["__children"] = prepend (preferences["__children"]:[],
+ typemap);
+ });
if (KiwiConfig["defaultroot"]:"" != "")
{
preferences["__children"] = add (preferences["__children"]:[], $[
@@ -435,6 +460,14 @@
"__value" : KiwiConfig["defaultroot"]:"",
]);
}
+ if (KiwiConfig["locale"]:"" != "")
+ {
+ preferences["__children"] = add (preferences["__children"]:[], $[
+ "__key" : "locale",
+ "__value" : KiwiConfig["locale"]:"",
+ ]);
+ }
+
list write_list = [ $[
@@ -602,7 +635,7 @@
});
}
- string cmd = sformat ("ZYPP_READONLY_HACK=1 kiwi --root %1 --prepare %2 --logfile terminal", chroot_dir, config_dir);
+ string cmd = sformat ("ZYPP_READONLY_HACK=1 kiwi --nocolor --root %1 --prepare %2 --logfile terminal", chroot_dir, config_dir);
y2milestone ("calling '%1'", cmd);
@@ -640,7 +673,7 @@
// now continue with creating
UI::ChangeWidget (`id(`log), `LastLine, "\n");
- cmd = sformat ("ZYPP_READONLY_HACK=1 kiwi --create %1 -d %2 --logfile terminal", chroot_dir, out_dir);
+ cmd = sformat ("ZYPP_READONLY_HACK=1 kiwi --nocolor --create %1 -d %2 --logfile terminal", chroot_dir, out_dir);
y2milestone ("calling '%1'", cmd);
// label
UI::ReplaceWidget (`id (`rpl), `Left (`Label (_("Creating Image"))));
Modified: trunk/product-creator/src/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/complex.ycp?rev=41716&r1=41715&r2=41716&view=diff
==============================================================================
--- trunk/product-creator/src/complex.ycp (original)
+++ trunk/product-creator/src/complex.ycp Thu Nov 1 16:23:02 2007
@@ -595,8 +595,8 @@
`VWeight (1, `RichText (`id (`descr), "")),
`HBox (
`PushButton (`id (`add), `opt (`key_F3), Label::AddButton ()),
- `PushButton (`id (`delete), `opt (`key_F5), Label::DeleteButton ()),
`PushButton (`id (`edit), `opt (`key_F4), Label::EditButton ()),
+ `PushButton (`id (`delete), `opt (`key_F5), Label::DeleteButton ()),
`HStretch ()
)
);
Modified: trunk/product-creator/src/kiwi_dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/kiwi_dialogs.ycp?rev=41716&r1=41715&r2=41716&view=diff
==============================================================================
--- trunk/product-creator/src/kiwi_dialogs.ycp (original)
+++ trunk/product-creator/src/kiwi_dialogs.ycp Thu Nov 1 16:23:02 2007
@@ -1506,7 +1506,9 @@
// combo box item
"usb" : _("USB Stick Image"),
// combo box item
- "vmx" : _("Virtual Disk Image")
+ "vmx" : _("Virtual Disk Image"),
+ // combo box item
+ "oem" : _("OEM Image")
];
list type_items = basic_type_items;
@@ -1521,7 +1523,7 @@
if (haskey (task2label, type))
{
type_items = add (type_items,
- `item (`id (type), task2label[type]:type));
+ `item (`id (type),task2label[type]:type,type == kiwi_task));
}
});
default_type_items = type_items;
@@ -1532,7 +1534,7 @@
//solve `back here (=no import)
foreach (string type, map data, Config["type"]:$[], {
type_its = add (type_its,
- `item (`id (type), task2label[type]:type));
+ `item (`id (type), task2label[type]:type, type == kiwi_task));
});
if (type_its != [])
type_items = type_its;
@@ -1799,14 +1801,16 @@
continue;
map parsed = URL::Parse(url);
+ boolean plaindir = false;
if (parsed["scheme"]:"" == "pkg")
{
- parsed["scheme"] = "dir";
+ parsed["scheme"] = "dir";
+ plaindir = true;
url = URL::Build (parsed);
}
repositories[url] = $[
"url" : url,
- "plaindir" : parsed["scheme"]:"" == "dir"
+ "plaindir" : plaindir,
];
update_repo_table ();
}
@@ -1831,14 +1835,16 @@
// remove current url + add new one
repositories = remove (repositories, selected_url);
map parsed = URL::Parse(url);
+ plaindir = false;
if (parsed["scheme"]:"" == "pkg")
{
parsed["scheme"] = "dir";
+ plaindir = true;
url = URL::Build (parsed);
}
repositories[url] = $[
"url" : url,
- "plaindir" : parsed["scheme"]:"" == "dir"
+ "plaindir" : plaindir
];
update_repo_table ();
}
@@ -1897,6 +1903,56 @@
}
kiwi_task = (string) UI::QueryWidget (`id (`type), `Value);
+
+ list<string> failed_repositories = [];
+ if (size (repositories) > 0)
+ {
+ map current_sources = $[];
+ // delete current repos, that won't be used in config
+ foreach (map source, Pkg::SourceEditGet (), {
+ integer srcid = source["SrcId"]:-1;
+ map data = Pkg::SourceGeneralData (srcid);
+ string url = data["url"]:"";
+ current_sources[url] = srcid;
+ });
+ // initialize new repos now
+ repositories = filter (string url, map repo, repositories, {
+ if (substring (url, 0, 1) == "/")
+ url = "dir://" + url;
+ if (haskey (current_sources, url))
+ {
+ current_sources = remove (current_sources, url);
+ return true;
+ }
+ integer source_ret = -1;
+ if (repo["plaindir"]:false)
+ source_ret = Pkg::SourceCreateType (url, "", "Plaindir");
+ else
+ source_ret = Pkg::SourceCreate (url, "");
+ if (source_ret == -1)
+ {
+ failed_repositories = add (failed_repositories, url);
+ return false;
+ }
+ else return true;
+ });
+ foreach (string url, integer srcid, current_sources, {
+ Pkg::SourceDelete (srcid);
+ });
+ }
+ if (failed_repositories != [])
+ {
+ // continue/cancel popup %1 is a \n separated list
+ if (!Popup::ContinueCancel (sformat (_("Failed to add these repositories:
+
+%1.
+
+Continue anyway?"), mergestring (failed_repositories, "\n"))))
+ {
+ update_repo_table ();
+ continue;
+ }
+ }
break;
}
}
@@ -1908,44 +1964,19 @@
}
if (ret == `next)
{
+ if (size (repositories) > 0)
+ {
+ ProductCreator::enable_sources = false;
+ Pkg::SourceLoad();
+ }
Config["kiwi_configuration_" + kiwi_task] = kiwi_configuration;
Config["_imported"] = true;
Config["iso-directory"] = out_dir +
(new_configuration ? "/" + name : "");
Config["name"] = name;
+ Config["new_configuration"] = new_configuration;
Config["sources"] = maplist (
string url, map repo, repositories, ``(url));
- Config["new_configuration"] = new_configuration;
- if (Config["sources"]:[] != [])
- {
- ProductCreator::enable_sources = false;
- map current_sources = $[];
- // delete current repos, that won't be used in config
- foreach (map source, Pkg::SourceEditGet (), {
- integer srcid = source["SrcId"]:-1;
- map data = Pkg::SourceGeneralData (srcid);
- string url = data["url"]:"";
- current_sources[url] = srcid;
- });
- // initialize new repos now
- foreach (string url, map repo, repositories, {
- if (substring (url, 0, 1) == "/")
- url = "dir://" + url;
- if (haskey (current_sources, url))
- {
- current_sources = remove (current_sources, url);
- return;
- }
- if (repo["plaindir"]:false)
- Pkg::SourceCreateType (url, "", "Plaindir");
- else
- Pkg::SourceCreate (url, "");
- });
- foreach (string url, integer srcid, current_sources, {
- Pkg::SourceDelete (srcid);
- });
- Pkg::SourceLoad();
- }
ProductCreator::Config = Config;
Kiwi::current_repositories = repositories;
Kiwi::kiwi_task = kiwi_task;
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org