Author: jsuchome
Date: Mon Oct 15 18:01:08 2007
New Revision: 41437
URL: http://svn.opensuse.org/viewcvs/yast?rev=41437&view=rev
Log:
- update defaultroot only for new configurations (#327057)
- check for absolute paths in boot image entry
- index repositories by url, not by order
- 2.13.15
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=41437&r1=41436&r2=41437&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/product-creator/VERSION (original)
+++ branches/SuSE-SLE-10-SP1-Branch/product-creator/VERSION Mon Oct 15 18:01:08 2007
@@ -1 +1 @@
-2.13.14
+2.13.15
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=41437&r1=41436&r2=41437&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 Oct 15 18:01:08 2007
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Mon Oct 15 16:41:48 CEST 2007 - jsuchome@suse.cz
+
+- update defaultroot only for new configurations (#327057)
+- check for absolute paths in boot image entry
+- index repositories by url, not by order
+- 2.13.15
+
+-------------------------------------------------------------------
Mon Oct 15 13:27:11 CEST 2007 - jsuchome@suse.cz
- fix initializing when going Back (#332581)
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=41437&r1=41436&r2=41437&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 Oct 15 18:01:08 2007
@@ -41,10 +41,10 @@
list<map> all_sources = [];
// repositories used for current configuration
- global map current_repositories = $[];
+ global map current_repositories = $[];
// initial system repositories
- global map initial_repositories = $[];
+ global map initial_repositories = $[];
// where the kiwi configuration files are stored
string config_dir = "";
@@ -95,8 +95,8 @@
map ret = $[];
// first check if we weren't importing this source:
- foreach (integer id, map repo, current_repositories, {
- if (repo["url"]:"" == source && repo["org"]:$[] != $[])
+ foreach (string url, map repo, current_repositories, {
+ if (url == source && repo["org"]:$[] != $[])
{
ret = $[
"__key" : "repository",
@@ -320,8 +320,9 @@
chroot_dir = tmp_dir + "/myphysical";
if (KiwiConfig["defaultroot"]:"" != "")
{
- chroot_dir =
- KiwiConfig["defaultroot"]:"" + "/" + KiwiConfig["name"]:"";
+ chroot_dir = KiwiConfig["defaultroot"]:"";
+ if (KiwiConfig["new_configuration"]:false)
+ chroot_dir = chroot_dir + "/" + KiwiConfig["name"]:"";
KiwiConfig["defaultroot"] = chroot_dir;
}
@@ -687,10 +688,9 @@
* @patam Config configuration map, as read from config.xml
* @param dir path to directory containing this config.xml
*/
- global map ImportImageRepositories (map Config, string dir) {
+ global map ImportImageRepositories (map Config, string dir) {
current_repositories = $[];
- integer i = 0;
foreach (map repo, (list<map>) Config["repository"]:[], {
string source = repo["source",0,"path"]:"";
if (source != "")
@@ -703,12 +703,12 @@
}
if (substring (source, 0, 1) == "/")
url = "dir://";
- current_repositories [i] = $[
- "url" : url + source,
+ url = url + source;
+ current_repositories [url] = $[
+ "url" : url,
"plaindir" : repo["type"]:"" == "rpm-dir",
"org" : repo,
];
- i = i + 1;
}
});
return current_repositories;
@@ -717,19 +717,17 @@
/**
* Initialize the list of current repositories
*/
- global map InitCurrentRepositories () {
+ global map InitCurrentRepositories () {
Pkg::SourceRestore ();
- integer i = 0;
foreach (map source, Pkg::SourceEditGet (), {
integer srcid = source["SrcId"]:-1;
map data = Pkg::SourceGeneralData (srcid);
string url = data["url"]:"";
- current_repositories[i] = $[
+ current_repositories[url] = $[
"url" : url,
"plaindir" : data["type"]:"" == "Plaindir"
];
- i = i + 1;
});
return current_repositories;
}
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=41437&r1=41436&r2=41437&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 Oct 15 18:01:08 2007
@@ -663,7 +663,9 @@
{
string bootdir = ProductCreator::Config["type",task,"boot"]:"";
if (bootdir == "" ||
- !FileUtils::Exists ("/usr/share/kiwi/image/" + bootdir))
+ (!FileUtils::Exists ("/usr/share/kiwi/image/" + bootdir) &&
+ !FileUtils::Exists (bootdir))
+ )
{
to_install = add (to_install, sformat("kiwi-desc-%1boot", task));
}
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=41437&r1=41436&r2=41437&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 Oct 15 18:01:08 2007
@@ -1458,7 +1458,7 @@
string kiwi_configuration = Config["kiwi_configuration_" + kiwi_task]:"";
string name = Config["name"]:"";
string out_dir = Config["iso-directory"]:"";
- map repositories = Kiwi::current_repositories;
+ map repositories = Kiwi::current_repositories;
boolean new_configuration = (Config == $[]);
boolean append_name = false;
@@ -1542,23 +1542,21 @@
// on start, show the default YaST sources
if (Config["sources"]:[] != [] && repositories == $[])
{
- integer i = 0;
foreach (string src, Config["sources"]:[], {
- repositories[i] = $[
+ repositories[src] = $[
"url" : src,
];
- i = i + 1;
});
}
- list system_repo_items = maplist (integer id, map repo,
+ list system_repo_items = maplist (string url, map repo,
Kiwi::initial_repositories, {
- return `item (`id (id), repo["url"]:"");
+ return `item (`id (url), url);
});
void update_repo_table () {
UI::ChangeWidget (`id (`repositories), `Items, maplist (
- integer id, map repo, repositories, ``(
- `item (`id (id), repo["url"]:""))
+ string url, map repo, repositories, ``(
+ `item (`id (url), url))
));
}
@@ -1656,13 +1654,6 @@
`Label (""),
`PushButton (`id (`browse), Label::BrowseButton ())
)
- /*
- `VBox (
- `Label (""),
- // checkbox label
- `CheckBox (`id (`append), _("A&ppend Name"), append_name)
- )
- */
),
`VSpacing (0.2),
`Table (`id(`repositories), `header (
@@ -1745,19 +1736,12 @@
string dir = (string) UI::QueryWidget (`id (`template), `Value);
update_config (dir, Kiwi::Templates[dir]:$[]);
}
- else if (is (ret, integer)) // system repository selected
+ else if (is (ret, string)) // system repository selected
{
- map system_repo = Kiwi::initial_repositories[(integer)ret]:$[];
- boolean present = false;
- foreach (integer id, map repo, repositories, {
- if (repo["url"]:"" == system_repo["url"]:"")
- {
- present = true;
- break;
- }
- });
- if (present) continue;
- repositories[size (repositories)] = system_repo;
+ map system_repo = Kiwi::initial_repositories[(string)ret]:$[];
+ if (!haskey (repositories, (string)ret))
+ repositories[(string)ret] = system_repo;
+
update_repo_table ();
}
else if (ret == `add)
@@ -1786,15 +1770,8 @@
Wizard::CloseDialog ();
if (url != "")
{
- boolean present = false;
- foreach (integer id, map repo, repositories, {
- if (repo["url"]:"" == url)
- {
- present = true;
- break;
- }
- });
- if (present) continue;
+ if (haskey (repositories, url))
+ continue;
map parsed = URL::Parse(url);
if (parsed["scheme"]:"" == "pkg")
@@ -1802,7 +1779,7 @@
parsed["scheme"] = "dir";
url = URL::Build (parsed);
}
- repositories[size (repositories)] = $[
+ repositories[url] = $[
"url" : url,
"plaindir" : parsed["scheme"]:"" == "dir"
];
@@ -1811,11 +1788,10 @@
}
else if (ret == `edit)
{
- integer selected = (integer)
+ string url = (string)
UI::QueryWidget (`id (`repositories), `CurrentItem);
- string url = repositories[selected,"url"]:"";
string selected_url = url;
- boolean plaindir = repositories[selected,"plaindir"]:false;
+ boolean plaindir = repositories[url,"plaindir"]:false;
// change schema if the source type is plaindir
// to show the right popup dialog
if (plaindir)
@@ -1828,14 +1804,14 @@
if (url == "" || url == nil || url == selected_url);
continue;
// remove current url + add new one
- repositories = remove (repositories, selected);
+ repositories = remove (repositories, url);
map parsed = URL::Parse(url);
if (parsed["scheme"]:"" == "pkg")
{
parsed["scheme"] = "dir";
url = URL::Build (parsed);
}
- repositories[size (repositories)] = $[
+ repositories[url] = $[
"url" : url,
"plaindir" : parsed["scheme"]:"" == "dir"
];
@@ -1843,7 +1819,7 @@
}
else if (ret == `delete)
{
- integer selected = (integer)
+ string selected = (string)
UI::QueryWidget (`id (`repositories), `CurrentItem);
repositories = remove (repositories, selected);
update_repo_table ();
@@ -1911,7 +1887,8 @@
(new_configuration ? "/" + name : "");
Config["name"] = name;
Config["sources"] = maplist (
- integer id, map repo, repositories, ``(repo["url"]:""));
+ string url, map repo, repositories, ``(url));
+ Config["new_configuration"] = new_configuration;
if (Config["sources"]:[] != [])
{
ProductCreator::enable_sources = false;
@@ -1924,8 +1901,7 @@
current_sources[url] = srcid;
});
// initialize new repos now
- foreach (integer id, map repo, repositories, {
- string url = repo["url"]:"";
+ foreach (string url, map repo, repositories, {
if (substring (url, 0, 1) == "/")
url = "dir://" + url;
if (haskey (current_sources, url))
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org