Hello community,
here is the log from the commit of package yast2-product-creator for openSUSE:Factory
checked in at Mon Aug 9 02:20:30 CEST 2010.
--------
--- yast2-product-creator/yast2-product-creator.changes 2010-04-29 18:03:54.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-product-creator/yast2-product-creator.changes 2010-08-05 13:23:20.000000000 +0200
@@ -1,0 +2,15 @@
+Thu Aug 5 13:20:49 CEST 2010 - jsuchome@suse.cz
+
+- command line mode fixes: initialize the sources, automatically
+ import GPG keys (bnc#626512)
+- 2.20.1
+
+-------------------------------------------------------------------
+Thu Aug 5 13:16:26 CEST 2010 - jsuchome@suse.cz
+
+- save config.xml after changing the package list (bnc#599952)
+- offer more options when packages are not available (bnc#599952)
+- check for package dependencies automatically (bnc#599952)
+- 2.20.0
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-product-creator-2.19.10.tar.bz2
New:
----
yast2-product-creator-2.20.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-product-creator.spec ++++++
--- /var/tmp/diff_new_pack.5zaigA/_old 2010-08-09 02:20:06.000000000 +0200
+++ /var/tmp/diff_new_pack.5zaigA/_new 2010-08-09 02:20:06.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-product-creator (Version 2.19.10)
+# spec file for package yast2-product-creator (Version 2.20.1)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,11 +19,11 @@
Name: yast2-product-creator
-Version: 2.19.10
+Version: 2.20.1
Release: 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-product-creator-2.19.10.tar.bz2
+Source0: yast2-product-creator-2.20.1.tar.bz2
Prefix: /usr
@@ -62,7 +62,7 @@
XEN images etc.), based on existing installation sources.
%prep
-%setup -n yast2-product-creator-2.19.10
+%setup -n yast2-product-creator-2.20.1
%build
%{prefix}/bin/y2tool y2autoconf
++++++ yast2-product-creator-2.19.10.tar.bz2 -> yast2-product-creator-2.20.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-product-creator-2.19.10/VERSION new/yast2-product-creator-2.20.1/VERSION
--- old/yast2-product-creator-2.19.10/VERSION 2010-04-29 18:03:16.000000000 +0200
+++ new/yast2-product-creator-2.20.1/VERSION 2010-08-05 13:21:23.000000000 +0200
@@ -1 +1 @@
-2.19.10
+2.20.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-product-creator-2.19.10/src/Kiwi.ycp new/yast2-product-creator-2.20.1/src/Kiwi.ycp
--- old/yast2-product-creator-2.19.10/src/Kiwi.ycp 2010-04-29 18:02:19.000000000 +0200
+++ new/yast2-product-creator-2.20.1/src/Kiwi.ycp 2010-04-29 18:03:39.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Data for kiwi configuration, input and output functions.
* Authors: Jiri Suchomel
*
- * $Id: Kiwi.ycp 61899 2010-04-28 14:56:41Z jsuchome $
+ * $Id: Kiwi.ycp 61923 2010-04-29 16:03:38Z jsuchome $
*/
{
module "Kiwi";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-product-creator-2.19.10/src/commandline.ycp new/yast2-product-creator-2.20.1/src/commandline.ycp
--- old/yast2-product-creator-2.19.10/src/commandline.ycp 2009-06-01 13:16:02.000000000 +0200
+++ new/yast2-product-creator-2.20.1/src/commandline.ycp 2010-08-05 13:19:04.000000000 +0200
@@ -13,9 +13,15 @@
import "Progress";
import "ProductCreator";
import "RichText";
+ import "SourceManager";
textdomain "product-creator";
+ // dummy function to return true when callback is invoked (from AutoInstall.ycp)
+ define boolean callbackTrue_boolean_map_integer(map dummy_map, integer dummy) {
+ return true;
+ }
+
void ProcessConfigFileOption(map params)
{
if (haskey(params, "configfile"))
@@ -156,6 +162,20 @@
ProductCreator::Readisolinux();
}
+ if (action != "show")
+ {
+ // initialize the sources before commiting configuration
+
+ ProductCreator::ResetArch();
+ // unload all active sources (reset the internal state, see bnc#469191)
+ Pkg::SourceFinishAll();
+
+ SourceManager::ReadSources();
+
+ // automatically import GPG keys when adding repository
+ Pkg::CallbackImportGpgKey (callbackTrue_boolean_map_integer);
+ }
+
// save the new configuration into global map, parse autoyast profile
ProductCreator::CommitConfig ();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-product-creator-2.19.10/src/complex.ycp new/yast2-product-creator-2.20.1/src/complex.ycp
--- old/yast2-product-creator-2.19.10/src/complex.ycp 2010-04-29 18:02:19.000000000 +0200
+++ new/yast2-product-creator-2.20.1/src/complex.ycp 2010-04-29 18:03:39.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Dialogs definitions
* Authors: Anas Nashif
*
- * $Id: complex.ycp 60181 2009-12-22 14:49:28Z jsuchome $
+ * $Id: complex.ycp 61923 2010-04-29 16:03:38Z jsuchome $
*/
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-product-creator-2.19.10/src/dialogs.ycp new/yast2-product-creator-2.20.1/src/dialogs.ycp
--- old/yast2-product-creator-2.19.10/src/dialogs.ycp 2010-01-25 20:03:28.000000000 +0100
+++ new/yast2-product-creator-2.20.1/src/dialogs.ycp 2010-08-05 13:18:21.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Dialogs definitions
* Authors: Anas Nashif
*
- * $Id: dialogs.ycp 60526 2010-01-25 19:03:05Z jsuchome $
+ * $Id: dialogs.ycp 62349 2010-08-05 11:18:20Z jsuchome $
*/
{
@@ -1246,6 +1246,25 @@
return result;
}
+ boolean InstallPackageOrProvider (string p) {
+
+ boolean selected = Pkg::PkgInstall(p);
+ y2milestone("selecting package for installation: %1 -> %2", p, selected);
+ if (!selected)
+ {
+ list <list> provides = Pkg::PkgQueryProvides (p);
+ provides = filter (list l, provides, {
+ return l[1]:`NONE != `NONE;
+ });
+ string pp = provides[0,0]:"";
+ if (pp != "")
+ {
+ y2milestone("selecting first package providing %1: %2 -> %3", p, pp, Pkg::PkgInstall (pp));
+ }
+ }
+
+ }
+
/**
* Display package selection dialog with preselected packages.
* @param base_pattern base pattern to install, can be empty ("") if there is no base pattern
@@ -1342,20 +1361,7 @@
{
foreach(string p, packages,
{
- boolean selected = Pkg::PkgInstall(p);
- y2milestone("selecting package for installation: %1 -> %2", p, selected);
- if (!selected)
- {
- list <list> provides = Pkg::PkgQueryProvides (p);
- provides = filter (list l, provides, {
- return l[1]:`NONE != `NONE;
- });
- string pp = provides[0,0]:"";
- if (pp != "")
- {
- y2milestone("selecting first package providing %1: %2 -> %3", p, pp, Pkg::PkgInstall (pp));
- }
- }
+ InstallPackageOrProvider (p);
});
}
@@ -1512,7 +1518,7 @@
y2milestone("Selected packages: %1 ", size(Pkg::GetPackages(`selected, true)));
// activate the selections
- boolean solved = Pkg::PkgSolve(true);
+ boolean solved = (ret == `cancel || Pkg::PkgSolve(true));
if (!solved)
{
@@ -1531,7 +1537,7 @@
list seladd = [];
list selbase = [];
- if ( ret != `back )
+ if ( ret != `back && ret != `cancel)
{
if (!using_patterns)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-product-creator-2.19.10/src/kiwi_dialogs.ycp new/yast2-product-creator-2.20.1/src/kiwi_dialogs.ycp
--- old/yast2-product-creator-2.19.10/src/kiwi_dialogs.ycp 2010-04-29 18:02:19.000000000 +0200
+++ new/yast2-product-creator-2.20.1/src/kiwi_dialogs.ycp 2010-08-05 13:18:21.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Dialogs for kiwi configuration
* Authors: Jiri Suchomel
*
- * $Id: kiwi_dialogs.ycp 61911 2010-04-29 11:26:01Z jsuchome $
+ * $Id: kiwi_dialogs.ycp 62349 2010-08-05 11:18:20Z jsuchome $
*/
{
textdomain "product-creator";
@@ -223,14 +223,12 @@
UI::ChangeWidget (`id (id), `Value, pat + pac + ign);
}
+
/**
- * Handler for software selection
+ * open package selector with given set of packages, return modified set
+ * or nil on cancel
*/
- define symbol HandleSWSelection (string key, map event) {
- if (event["ID"]:nil == key)
- {
- integer package_set = KiwiConfig["package_set"]:0;
- map sw_contents = KiwiConfig["packages",package_set]:$[];
+ define map modifyPackageSelection (map sw_contents) {
integer mbytes = (integer) UI::QueryWidget (`id ("size"), `Value);
if (UI::QueryWidget (`id ("sizeunit"), `Value) == "G")
@@ -249,7 +247,7 @@
``(pat["name"]:"")),
`packages
);
- if (ret_map["ui"]:nil == `cancel)
+ if (ret_map["ui"]:nil == `cancel || ret_map["ui"]:nil == `failed)
return nil;
sw_contents["opensusePattern"] = maplist (string name,
ret_map["addons"]:[], ``($[ "name" : name]));
@@ -257,7 +255,20 @@
ret_map["packages"]:[], ``($[ "name" : name]));
sw_contents["ignore"] = maplist (string name,
ret_map["taboo"]:[], ``($[ "name" : name]));
- KiwiConfig["packages",package_set] = sw_contents;
+
+ return sw_contents;
+ }
+
+ /**
+ * Handler for software selection
+ */
+ define symbol HandleSWSelection (string key, map event) {
+ if (event["ID"]:nil == key)
+ {
+ integer package_set = KiwiConfig["package_set"]:0;
+ map sw_contents = modifyPackageSelection (KiwiConfig["packages",package_set]:$[]);
+ if (sw_contents != nil)
+ KiwiConfig["packages",package_set] = sw_contents;
InitSWRichText ("rt_sw");
}
return nil;
@@ -962,6 +973,128 @@
}
/**
+ * Check if selected packages are available (some of them may not after
+ * deleting some repository)
+ * return true if there was no conflict
+ */
+ define symbol CheckForAvailablePackages (boolean ignore_allowed) {
+
+ list<map> packages_section = KiwiConfig["packages"]:[];
+ integer index = 0;
+ symbol ret = `ok;
+ foreach (map pmap, packages_section, {
+ string type = pmap["type"]:"";
+ if (type != "delete")
+ {
+ Popup::ShowFeedback (_("Checking packages availability..."), _("Please wait..."));
+ list<string> n_a = [];
+ foreach (map p, pmap["package"]:[], {
+ if (p["name"]:"" != "" && !Pkg::IsAvailable (p["name"]:""))
+ n_a = add (n_a, p["name"]:"");
+ });
+ Popup::ClearFeedback ();
+ if (size (n_a) > 0)
+ {
+ ret = `missing;
+ string type_label = section_type_label[type]:type;
+
+ UI::OpenDialog (`opt (`decorated), `HBox (`VSpacing (25),
+ `VBox (
+ `HSpacing (70),
+ `Left(`Heading (_("Missing packages"))),
+ `VSpacing(0.2),
+ // popup text
+ `RichText (sformat (_("<p>These packages from section '%1' are not available with selected repositories:</p>
+<p>%2.</p>
+<p>
+You can remove the packages from the section, check the detailed package selection or ignore the situation.</p>
+<p>
+Going to detailed package selection and accepting the view without any further changes results in removal of problematic packages from the section.
+</p>"), type_label, mergestring (sort (n_a), "<br>"))),
+ `HBox (
+ // button label
+ `PushButton (`id (`remove), `opt (`default), _("Remove the packages")),
+ // button label
+ `PushButton (`id (`selection), _("Check package selection")),
+ // button label
+ `PushButton (`id (`ignore), ignore_allowed ? _("Ignore") : _("Cancel"))
+ )
+ )
+ ));
+ any r = UI::UserInput ();
+ UI::CloseDialog ();
+ if (r == `remove)
+ {
+ KiwiConfig["packages",index,"package"] = filter (map p, pmap["package"]:[], {
+ return !contains (n_a, p["name"]:"");
+ });
+ ret = `removed;
+ }
+ if (r == `selection)
+ {
+ map sw_contents = modifyPackageSelection (KiwiConfig["packages",index]:$[]);
+ if (sw_contents != nil)
+ {
+ KiwiConfig["packages",index] = sw_contents;
+ ret = `selection;
+ }
+ }
+ }
+ }
+ index = index + 1;
+ });
+
+ return ret;
+ }
+
+ /**
+ * Check if all selected packages and patterns can be installed
+ * If dependency problem was found, open package selector.
+ * Return false if package selector was canceled
+ */
+ define boolean CheckPackageDependencies () {
+
+ boolean ret = true;
+
+ list<map> packages_section = KiwiConfig["packages"]:[];
+ integer index = 0;
+ foreach (map pmap, packages_section, {
+ string type = pmap["type"]:"";
+ if (type != "delete")
+ {
+ Pkg::ResolvableNeutral ("", `package, true);
+ Pkg::ResolvableNeutral ("", `pattern, true);
+
+ foreach (map pat, pmap["opensusePattern"]:[], {
+ Pkg::ResolvableInstall(pat["name"]:"", `pattern);
+ });
+
+ ProductCreator::MarkTaboo (maplist (map i, pmap["ignore"]:[], ``(i["name"]:"")));
+
+ foreach (map p, KiwiConfig["packages",index,"package"]:[], {
+ InstallPackageOrProvider (p["name"]:"");
+ });
+
+ boolean solved = Pkg::PkgSolve (true);
+ if (!solved)
+ {
+ map sw_contents = modifyPackageSelection (KiwiConfig["packages",index]:$[]);
+ if (sw_contents != nil)
+ {
+ KiwiConfig["packages",index] = sw_contents;
+ }
+ else
+ {
+ ret = false;
+ }
+ }
+ }
+ index = index + 1;
+ });
+ return ret;
+ }
+
+ /**
* handler for main action: create the iso image with kiwi
*/
define boolean CreateImage (string key, map event) {
@@ -1040,7 +1173,6 @@
directory."),
];
- Kiwi::WriteConfigXML (KiwiConfig, kiwi_task);
boolean create_image_now = false;
string selected_profiles = "";
if (size (KiwiConfig["profiles"]:[]) > 0)
@@ -1095,6 +1227,21 @@
}
if (create_image_now)
{
+ if (CheckForAvailablePackages (false) == `missing)
+ {
+ y2milestone ("there were missing packages, not going to build");
+ InitSWRichText ("rt_sw");
+ return false;
+ }
+ if (!CheckPackageDependencies ())
+ {
+ y2milestone ("there was unresolved dependency problem, not going to build");
+ InitSWRichText ("rt_sw");
+ return false;
+ }
+ // write XML now, after possible modification of the package list
+ Kiwi::WriteConfigXML (KiwiConfig, kiwi_task);
+
string out_dir = KiwiConfig["iso-directory"]:"";
if (FileUtils::CheckAndCreatePath (out_dir) &&
Kiwi::PrepareAndCreate (out_dir, selected_profiles))
@@ -1121,6 +1268,11 @@
ret = false;
}
}
+ else
+ {
+ Kiwi::WriteConfigXML (KiwiConfig, kiwi_task);
+ }
+
string dir = Kiwi::SaveConfiguration (KiwiConfig, kiwi_task);
if (dir != nil && dir != "")
{
@@ -1201,8 +1353,8 @@
});
KiwiConfig["import_files"] = import_files;
-
map read_config = Kiwi::ReadConfigXML (kiwi_configuration);
+
if (!KiwiConfig["_imported"]:false)
{
// "type" had different meaning in ProductCreator::Config...
@@ -1864,37 +2016,6 @@
];
}
-/**
- * Check if selected packages are available (some of them may not after
- * deleting some repository)
- */
-define boolean CheckForAvailablePackages () {
-
- Popup::ShowFeedback (_("Checking packages availability..."), _("Please wait..."));
- foreach (map pmap, KiwiConfig["packages"]:[], {
- string type = pmap["type"]:"";
- if (type != "delete")
- {
- list<string> n_a = [];
- foreach (map p, pmap["package"]:[], {
- if (p["name"]:"" != "" && !Package::Available (p["name"]:""))
- n_a = add (n_a, p["name"]:"");
- });
- if (size (n_a) > 0)
- {
- string type_label = section_type_label[type]:type;
- // popup headline
- Popup::LongText (_("Missing packages"),
- // popup text
- `RichText (sformat (_("<p>These packages from section '%1' are not available with selected repositories:</p>
-<p>%2.</p>
-<p>Check the list of packages and package repositories.</p>"), type_label, mergestring (sort (n_a), "<br>"))), 70, 25);
- }
- }
- });
- Popup::ClearFeedback ();
- return true;
-}
/**
* Main dialog for Kiwi image configuration
@@ -1903,7 +2024,10 @@
InitImageConfiguration ();
-CheckForAvailablePackages ();
+if (CheckForAvailablePackages (true) != `selection)
+{
+ CheckPackageDependencies ();
+}
map widget_descr = get_widget_description ();
widget_descr["tab"] = CWMTab::CreateWidget($[
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org