Mailinglist Archive: yast-commit (864 mails)

< Previous Next >
[yast-commit] r41966 - in /branches/SuSE-SLE-10-SP1-Branch/product-creator: VERSION package/yast2-product-creator.changes src/Kiwi.ycp src/complex.ycp src/kiwi_dialogs.ycp
  • From: jsuchome@xxxxxxxxxxxxxxxx
  • Date: Mon, 12 Nov 2007 13:06:54 -0000
  • Message-id: <20071112130654.F3C272816B@xxxxxxxxxxxxxxxx>
Author: jsuchome
Date: Mon Nov 12 14:06:54 2007
New Revision: 41966

URL: http://svn.opensuse.org/viewcvs/yast?rev=41966&view=rev
Log:
- do not allow importing non-system configurations (#340495)
- 2.13.23


Modified:
branches/SuSE-SLE-10-SP1-Branch/product-creator/VERSION

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/kiwi_dialogs.ycp

Modified: branches/SuSE-SLE-10-SP1-Branch/product-creator/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/product-creator/VERSION?rev=41966&r1=41965&r2=41966&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/product-creator/VERSION (original)
+++ branches/SuSE-SLE-10-SP1-Branch/product-creator/VERSION Mon Nov 12 14:06:54
2007
@@ -1 +1 @@
-2.13.22
+2.13.23

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=41966&r1=41965&r2=41966&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
Mon Nov 12 14:06:54 2007
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Nov 12 12:30:16 CET 2007 - jsuchome@xxxxxxx
+
+- do not allow importing non-system configurations (#340495)
+- 2.13.23
+
+-------------------------------------------------------------------
Tue Nov 6 13:09:09 CET 2007 - jsuchome@xxxxxxx

- remove unsupported source types also for product-creator-> kiwi

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=41966&r1=41965&r2=41966&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 Mon Nov 12
14:06:54 2007
@@ -315,7 +315,7 @@
ret["xen_disk"] = packages["xen","disk"]:"";
if (packages["xen","memory"]:"" != "")
ret["xen_memory"] = tointeger (packages["xen","memory"]:"512");
- foreach (string key, [ "author", "contact", "specification",
+ foreach (string key, [ "author", "contact", "image_type", "specification",
"packagemanager", "version", "rpm-check-signatures", "rpm-force",
"sizeunit", "type", "name", "repository", "defaultdestination",
"schemeversion", "defaultroot", "inherit", "locale"],
@@ -804,7 +804,9 @@
{
string name = config["name"]:"";
string ver = config["version"]:"";
- if (name_version[name]:"" == ver)
+ if (config["image_type"]:"" != "system")
+ y2warning ("%1 not a 'system' image type, skipping", name);
+ else if (name_version[name]:"" == ver)
y2warning ("template %1,%2 already imported", name, ver);
else
{

Modified: branches/SuSE-SLE-10-SP1-Branch/product-creator/src/complex.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/product-creator/src/complex.ycp?rev=41966&r1=41965&r2=41966&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/product-creator/src/complex.ycp (original)
+++ branches/SuSE-SLE-10-SP1-Branch/product-creator/src/complex.ycp Mon Nov 12
14:06:54 2007
@@ -549,6 +549,11 @@
if (FileUtils::Exists (images_dir + "/" + d + "/config.xml"))
{
map config = Kiwi::ReadConfigXML (images_dir + "/" + d);
+ if (config["image_type"]:"" != "system")
+ {
+ y2warning ("%1 not a 'system' image type, skipping", d);
+ return;
+ }
string task = "iso";
// FIXME duplicated in kiwi_dialogs
foreach (string type, map data, config["type"]:$[], {

Modified: branches/SuSE-SLE-10-SP1-Branch/product-creator/src/kiwi_dialogs.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/product-creator/src/kiwi_dialogs.ycp?rev=41966&r1=41965&r2=41966&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/product-creator/src/kiwi_dialogs.ycp
(original)
+++ branches/SuSE-SLE-10-SP1-Branch/product-creator/src/kiwi_dialogs.ycp Mon
Nov 12 14:06:54 2007
@@ -1572,11 +1572,20 @@

// read the new configuration and update UI accordingly
// (no need to read config if it is provided as argument)
- void update_config (string dir, map config) {
+ boolean update_config (string dir, map config) {

kiwi_configuration = dir;
Config =
(config == $[] ? Kiwi::ReadConfigXML (kiwi_configuration) : config);
+
+ if (Config["image_type"]:"" != "system")
+ {
+ y2warning ("%1 does not have 'system' image type, skipping", dir);
+ // error popup
+ Popup::Error (_("Selected directory does not contain valid
description of system configuration"));
+ return false;
+ }
+
// busy popup
Popup::ShowFeedback (_("Importing repositories..."), _("Please
wait..."));
repositories = Kiwi::ImportImageRepositories (Config, dir);
@@ -1610,6 +1619,7 @@
});
UI::ChangeWidget (`id (`type), `Items, type_its);
UI::ChangeWidget (`id (`type), `Value, kiwi_task);
+ return true;
}

list template_items = maplist (string dir, map template,
Kiwi::Templates, {
@@ -1735,10 +1745,9 @@
kiwi_configuration== "" ? Kiwi::images_dir : kiwi_configuration,
// popup for file selection dialog
_("Directory to Import"));
- if (dir!= nil)
+ if (dir!= nil && update_config (dir, $[]))
{
UI::ChangeWidget (`id (`import_dir), `Value, dir);
- update_config (dir, $[]);
}
}
else if (ret == `template)
@@ -1746,7 +1755,8 @@
string dir = (string) UI::QueryWidget (`id (`template), `Value);
update_config (dir, Kiwi::Templates[dir]:$[]);
}
- else if (is (ret, string)) // system repository selected
+ else if (is (ret, string) && // system repository selected
+ ret != "rb_dir" && ret != "rb_new")
{
map system_repo = Kiwi::initial_repositories[(string)ret]:$[];
if (!haskey (repositories, (string)ret))

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages