[yast-commit] r41251 - in /branches/SuSE-SLE-10-SP1-Branch/product-creator: agent-kiwi/ package/ src/ src/data/
![](https://seccdn.libravatar.org/avatar/ccabc6c04379b11d036b089b67199614.jpg?s=120&d=mm&r=g)
Author: jsuchome
Date: Wed Oct 3 22:32:51 2007
New Revision: 41251
URL: http://svn.opensuse.org/viewcvs/yast?rev=41251&view=rev
Log:
- copy whole content of imported kiwi config directory (#330052)
- save defaultroot value to config.xml (#330059)
- don't ignore 'inherit' tag (#330079)
- added support for "this://" in repository paths (#330095)
- do not close module after kiwi failure (#327593)
- check stderr and stdout after kiwi finish/failure (#327610)
- do not allow configuration without name (#328003)
- destination directory specified in sysconfig file (#327055)
- support for kiwi images templates (F302371)
- support project control for images (F302370)
- use zypper instead of smart
- write schemeversion to config.xml
- directories with templates are specified in
/etc/sysconfig/product-creator
- enable modifications of configurations without creating images
- do not import already imported and modified configuration
- enable support for unlisted boot images (e.g. netboot)
- show the maximum available space
- use lazy initialization of installation sources
- tell zypper to ignore zypp lock (#310581)
- remove 'prepare' directory before calling kiwi (#325664)
- use defaultroot value from config.xml for 'prepare' directory (F302371)
- 2.13.12
Modified:
branches/SuSE-SLE-10-SP1-Branch/product-creator/agent-kiwi/ag_kiwi
branches/SuSE-SLE-10-SP1-Branch/product-creator/package/yast2-product-creator.changes
branches/SuSE-SLE-10-SP1-Branch/product-creator/src/Kiwi.ycp
branches/SuSE-SLE-10-SP1-Branch/product-creator/src/complex.ycp
branches/SuSE-SLE-10-SP1-Branch/product-creator/src/data/sysconfig.product-creator
branches/SuSE-SLE-10-SP1-Branch/product-creator/src/kiwi_dialogs.ycp
branches/SuSE-SLE-10-SP1-Branch/product-creator/src/wizards.ycp
Modified: branches/SuSE-SLE-10-SP1-Branch/product-creator/agent-kiwi/ag_kiwi
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/product-creator/agent-kiwi/ag_kiwi?rev=41251&r1=41250&r2=41251&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/product-creator/agent-kiwi/ag_kiwi (original)
+++ branches/SuSE-SLE-10-SP1-Branch/product-creator/agent-kiwi/ag_kiwi Wed Oct 3 22:32:51 2007
@@ -36,7 +36,7 @@
for (my $i=1;$i<= $packageNodeList->size();$i++) {
my $node = $packageNodeList -> get_node($i);
my $type = $node -> getAttribute ("type");
- y2milestone ("package list type: $type");
+ y2debug ("package list type: $type");
$retmap{$key}{$type} = {};
my $patterntype = $node -> getAttribute ("patternType");
$retmap{$key}{$type}{"patternType"} = $patterntype if $patterntype;
@@ -60,7 +60,8 @@
}
my $prefs = $optionsNodeList -> get_node(1);
foreach my $tag ("packagemanager", "version", "rpm-check-signatures",
- "rpm-force", "size", "defaultdestination", "defaultroot") {
+ "rpm-force", "size", "defaultdestination", "defaultroot", "locale")
+ {
my $element = $prefs -> getElementsByTagName ($tag);
$retmap{$tag} = $element->get_node(1)->textContent () if ($element);
}
@@ -96,11 +97,17 @@
my $image = $systemTree -> getElementsByTagName ("image")->get_node (1);
my $image_name = $image -> getAttribute ("name");
- $retmap{"name"} = $image_name if $image_name;
+ if ($image_name) {
+ $retmap{"name"} = $image_name;
+ y2milestone ("image name: $image_name");
+ }
my $scheme_ver = $image -> getAttribute ("schemeversion");
$retmap{"schemeversion"} = $scheme_ver if $scheme_ver;
+ my $inherit = $image -> getAttribute ("inherit");
+ $retmap{"inherit"} = $inherit if $inherit;
+
$retmap{"users"} = {};
foreach my $usernode ($usrdataNodeList -> get_nodelist()) {
my $group = $usernode -> getAttribute("group");
@@ -123,7 +130,7 @@
for (my $i=1;$i<= $driversNodeList->size();$i++) {
my $node = $driversNodeList -> get_node($i);
my $type = $node -> getAttribute ("type");
- y2milestone ("driver list type: $type");
+ y2debug ("driver list type: $type");
$retmap{$key}{$type} = {};
foreach my $tag ("file") {
my @list = ();
Modified: branches/SuSE-SLE-10-SP1-Branch/product-creator/package/yast2-product-creator.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/product-creator/package/yast2-product-creator.changes?rev=41251&r1=41250&r2=41251&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/product-creator/package/yast2-product-creator.changes (original)
+++ branches/SuSE-SLE-10-SP1-Branch/product-creator/package/yast2-product-creator.changes Wed Oct 3 22:32:51 2007
@@ -1,11 +1,25 @@
-------------------------------------------------------------------
-Tue Sep 18 09:46:27 CEST 2007 - jsuchome@suse.cz
+Tue Oct 2 11:49:14 CEST 2007 - jsuchome@suse.cz
+- copy whole content of imported kiwi config directory (#330052)
+- save defaultroot value to config.xml (#330059)
+- don't ignore 'inherit' tag (#330079)
+- added support for "this://" in repository paths (#330095)
+- 2.13.12
+
+-------------------------------------------------------------------
+Mon Oct 1 14:43:47 CEST 2007 - jsuchome@suse.cz
+
+- do not close module after kiwi failure (#327593)
+- check stderr and stdout after kiwi finish/failure (#327610)
+- do not allow configuration without name (#328003)
+- destination directory specified in sysconfig file (#327055)
- support for kiwi images templates (F302371)
- support project control for images (F302370)
- use zypper instead of smart
- write schemeversion to config.xml
-- directories with templates are specified in sysconfig/product-creator
+- directories with templates are specified in
+ /etc/sysconfig/product-creator
- enable modifications of configurations without creating images
- do not import already imported and modified configuration
- enable support for unlisted boot images (e.g. netboot)
@@ -14,7 +28,6 @@
- tell zypper to ignore zypp lock (#310581)
- remove 'prepare' directory before calling kiwi (#325664)
- use defaultroot value from config.xml for 'prepare' directory (F302371)
-- 2.13.12
-------------------------------------------------------------------
Mon Sep 17 15:27:43 CEST 2007 - jsuchome@suse.cz
Modified: branches/SuSE-SLE-10-SP1-Branch/product-creator/src/Kiwi.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/product-creator/src/Kiwi.ycp?rev=41251&r1=41250&r2=41251&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/product-creator/src/Kiwi.ycp (original)
+++ branches/SuSE-SLE-10-SP1-Branch/product-creator/src/Kiwi.ycp Wed Oct 3 22:32:51 2007
@@ -27,8 +27,14 @@
// temporary directory, where kiwi is working
global string tmp_dir = "";
+ // directory for saving image configurations
global string images_dir = Directory::vardir + "/product-creator/images";
+ // directories with user-made templated
+ global list<string> templates_dirs = [];
+
+ global string default_packagemanager = "zypper";
+
list<map> all_sources = [];
// repositories used for current configuration
@@ -79,8 +85,34 @@
/**
* generate the 'repository' tag
*/
- map get_source_value (string source) {
+ map get_source_value (string source, map config) {
+
+ map ret = $[];
+ // first check if we weren't importing this source:
+ foreach (integer id, map repo, current_repositories, {
+ if (repo["url"]:"" == source && repo["org"]:$[] != $[])
+ {
+ ret = $[
+ "__key" : "repository",
+ "type" : repo["org","type"]:"",
+ "__children": [
+ $[
+ "__key" : "source",
+ "path" : repo["org","source",0,"path"]:"",
+ ]
+ ]
+ ];
+ if (repo["org","status"]:"" != "")
+ ret["status"] = repo["org","status"]:"";
+ }
+ });
+ if (ret != $[])
+ {
+ y2milestone ("imported source: %1", source);
+ return ret;
+ }
+ // ... otherwise, we must ask zypp:
string type = "yast2";
string source_path = adapt_source_path (source);
@@ -96,7 +128,7 @@
type = "rpm-md";
}
});
- return $[
+ ret = $[
"__key" : "repository",
"type" : type,
"__children": [
@@ -106,6 +138,7 @@
]
]
];
+ return ret;
}
/**
@@ -128,10 +161,11 @@
"__value" : task,
"primary" : "true",
"boot" : boot_image,
-//TODO (KiwiConfig["compressed"]:false ? ",compressed" : ""),
];
if (task != "iso")
- ret["filesystem"] = "ext3";
+ ret["filesystem"] = config["type",task,"filesystem"]:"ext3";
+ if (config["type",task,"flags"]:"" != "")
+ ret["flags"] = config["type",task,"flags"]:"";
return ret;
}
@@ -247,7 +281,7 @@
foreach (string key, [ "author", "contact", "specification",
"packagemanager", "version", "rpm-check-signatures", "rpm-force",
"sizeunit", "type", "name", "repository", "defaultdestination",
- "schemeversion", "defaultroot"],
+ "schemeversion", "defaultroot", "inherit"],
{
if (config[key]:nil != nil)
ret[key] = config[key]:nil;
@@ -353,30 +387,7 @@
])
);
- list write_list = [ $[
- "__key" : "image",
- "name" : KiwiConfig["name"]:"",
- "schemeversion" : KiwiConfig["schemeversion"]:"1.4",
- "__children" : [
- $[
- "__key" : "description",
- "type" : "system",
- "__children" : [
- $[
- "__key" : "author",
- "__value" : KiwiConfig["author"]:"",
- ],
- $[
- "__key" : "contact",
- "__value" : KiwiConfig["contact"]:"",
- ],
- $[
- "__key" : "specification",
- "__value" : KiwiConfig["specification"]:"",
- ],
- ],
- ],
- $[
+ map preferences = $[
"__key" : "preferences",
"__children" : [
get_type_value (KiwiConfig, task),
@@ -391,8 +402,7 @@
],
$[
"__key" : "packagemanager",
- "__value" : "zypper",
-// "__value" : "smart",
+ "__value" : KiwiConfig["packagemanager"]:default_packagemanager
],
$[
"__key" : "rpm-check-signatures",
@@ -407,9 +417,44 @@
"__value" : KiwiConfig["iso-directory"]:"",
],
],
+ ];
+ if (KiwiConfig["defaultroot"]:"" != "")
+ {
+ preferences["__children"] = add (preferences["__children"]:[], $[
+ "__key" : "defaultroot",
+ "__value" : KiwiConfig["defaultroot"]:"",
+ ]);
+ }
+
+
+ list write_list = [ $[
+ "__key" : "image",
+ "name" : KiwiConfig["name"]:"",
+ "schemeversion" : KiwiConfig["schemeversion"]:"1.4",
+ "__children" : [
+ $[
+ "__key" : "description",
+ "type" : "system",
+ "__children" : [
+ $[
+ "__key" : "author",
+ "__value" : KiwiConfig["author"]:"",
+ ],
+ $[
+ "__key" : "contact",
+ "__value" : KiwiConfig["contact"]:"",
+ ],
+ $[
+ "__key" : "specification",
+ "__value" : KiwiConfig["specification"]:"",
+ ],
+ ],
],
+ preferences,
],
]];
+ if (KiwiConfig["inherit"]:"" != "")
+ write_list[0,"inherit"] = KiwiConfig["inherit"]:"";
if (haskey (KiwiConfig, "users"))
{
write_list[0,"__children"] = add (write_list[0,"__children"]:[], $[
@@ -428,7 +473,7 @@
}
write_list[0,"__children"] = union (write_list[0,"__children"]:[],
maplist (string source, (list<string>) KiwiConfig["sources"]:[],
- ``(get_source_value (source))
+ ``(get_source_value (source, KiwiConfig))
)
);
write_list[0,"__children"] = union (write_list[0,"__children"]:[], [
@@ -467,7 +512,7 @@
SCR::Write (.target.string, config_dir + "/config.xml", write_string);
foreach (string dir, ["root_dir", "config_dir"], {
foreach (string val, KiwiConfig[dir]:[], {
- string realdir = config_dir + "/" + substring (dir, 0, find (dir, "_"));
+ string realdir = config_dir + "/" + substring (dir, 0, search (dir, "_"));
boolean created = false;
if (val != "" && FileUtils::Exists (val))
{
@@ -487,6 +532,10 @@
SCR::Execute (.target.bash, "chmod +x " + config_dir + "/" + file);
}
});
+ foreach (string file, KiwiConfig["import_files"]:[], {
+ y2milestone ("copying %1 to %2", file,config_dir);
+ SCR::Execute (.target.bash, sformat ("cp -ar %1 %2/", file,config_dir));
+ });
return true;
}
@@ -507,12 +556,6 @@
SCR::Execute (.target.bash, sformat ("rm -rf %1", chroot_dir));
}
- string cmd = sformat ("ZYPP_READONLY_HACK=1 kiwi --root %1 --prepare %2 --logfile terminal", chroot_dir, config_dir);
-
- y2milestone ("calling '%1'", cmd);
-
- SCR::Execute (.background.run_output_err, cmd);
-
// construct the dialog
UI::OpenDialog(`opt(`decorated), `HBox(`HSpacing(1.5),
`VBox(
@@ -534,6 +577,27 @@
), `HSpacing(1.5)
));
+ void update_output () {
+ // read the output line from irw:
+ list<string> out = (list<string>)SCR::Read(.background.newout);
+ foreach (string line, out, {
+ line = String::Replace (line, "\r", "\n");
+ UI::ChangeWidget (`id(`log), `LastLine, line + "\n");
+ });
+
+ list<string> err = (list<string>) SCR::Read(.background.newerr);
+ foreach (string line, err, {
+ line = String::Replace (line, "\r", "\n");
+ UI::ChangeWidget (`id(`errlog), `LastLine, line + "\n");
+ });
+ }
+
+ string cmd = sformat ("ZYPP_READONLY_HACK=1 kiwi --root %1 --prepare %2 --logfile terminal", chroot_dir, config_dir);
+
+ y2milestone ("calling '%1'", cmd);
+
+ SCR::Execute (.background.run_output_err, cmd);
+
symbol ret = nil;
boolean creating = false;
do
@@ -542,21 +606,12 @@
if ((boolean) SCR::Read(.background.output_open) &&
(integer) SCR::Read(.background.newlines)>0)
{
- // read the output line from irw:
- list<string> out = (list<string>)SCR::Read(.background.newout);
- foreach (string line, out, {
- line = String::Replace (line, "\r", "\n");
- UI::ChangeWidget (`id(`log), `LastLine, line + "\n");
- });
-
- list<string> err = (list<string>) SCR::Read(.background.newerr);
- foreach (string line, err, {
- line = String::Replace (line, "\r", "\n");
- UI::ChangeWidget (`id(`errlog), `LastLine, line + "\n");
- });
+ update_output ();
}
else if (!(boolean)SCR::Read(.background.isrunning))
{
+ update_output ();
+
integer status = (integer) SCR::Read (.background.status);
if (status != 0)
{
@@ -620,8 +675,10 @@
/**
* Import repositories from given kiwi image configuration
+ * @patam Config configuration map, as read from config.xml
+ * @param dir path to directory containing this config.xml
*/
- global map
participants (1)
-
jsuchome@svn.opensuse.org