Hello community,
here is the log from the commit of package yast2-installation
checked in at Mon Apr 28 18:03:50 CEST 2008.
--------
--- yast2-installation/yast2-installation.changes 2008-04-25 18:17:03.000000000 +0200
+++ /mounts/work_src_done/NOARCH/yast2-installation/yast2-installation.changes 2008-04-28 17:50:51.000000000 +0200
@@ -1,0 +2,12 @@
+Mon Apr 28 11:42:21 CEST 2008 - locilka@suse.cz
+
+- Handling KDE3 vs KDE4 in default logon and window managers
+ (bnc #381821).
+- Optional and extra URLs moved to control file as well as default
+ update repository (bnc #381360).
+- Added possibility to abort installation during image deployment
+ (bnc #382326).
+- Progress for inst_proposal.
+- 2.16.41
+
+-------------------------------------------------------------------
Old:
----
yast2-installation-2.16.40.tar.bz2
New:
----
yast2-installation-2.16.41.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.A21284/_old 2008-04-28 18:03:42.000000000 +0200
+++ /var/tmp/diff_new_pack.A21284/_new 2008-04-28 18:03:42.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-installation (Version 2.16.40)
+# spec file for package yast2-installation (Version 2.16.41)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,12 +12,12 @@
Name: yast2-installation
-Version: 2.16.40
+Version: 2.16.41
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-installation-2.16.40.tar.bz2
+Source0: yast2-installation-2.16.41.tar.bz2
Prefix: /usr
BuildRequires: docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer sgml-skel update-desktop-files yast2-core-devel yast2-devtools yast2-testsuite
# PackageCallbacks::RegisterEmptyProgressCallbacks()
@@ -34,7 +34,8 @@
# Language::Set (handles downloading the translation extensions)
Requires: yast2-country-data >= 2.16.11
# DefaultDesktop::SelectedDesktops
-Requires: yast2-packager >= 2.16.37
+# ... + newly added data into desktops map
+Requires: yast2-packager >= 2.16.41
# Only in inst-sys
# Requires: yast2-runlevel
# Requires: yast2-network
@@ -106,7 +107,7 @@
Lukas Ocilka
%prep
-%setup -n yast2-installation-2.16.40
+%setup -n yast2-installation-2.16.41
%build
%{prefix}/bin/y2tool y2autoconf
@@ -171,8 +172,16 @@
%doc %{prefix}/share/doc/packages/yast2-installation
%exclude %{prefix}/share/doc/packages/yast2-installation/COPYING
%exclude %{prefix}/share/doc/packages/yast2-installation/README
-
%changelog
+* Mon Apr 28 2008 locilka@suse.cz
+- Handling KDE3 vs KDE4 in default logon and window managers
+ (bnc #381821).
+- Optional and extra URLs moved to control file as well as default
+ update repository (bnc #381360).
+- Added possibility to abort installation during image deployment
+ (bnc #382326).
+- Progress for inst_proposal.
+- 2.16.41
* Fri Apr 25 2008 locilka@suse.cz
- New desktop selection dialog (bnc #379157).
- 2.16.40
++++++ yast2-installation-2.16.40.tar.bz2 -> yast2-installation-2.16.41.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.40/src/clients/desktop_finish.ycp new/yast2-installation-2.16.41/src/clients/desktop_finish.ycp
--- old/yast2-installation-2.16.40/src/clients/desktop_finish.ycp 2008-04-21 14:49:57.000000000 +0200
+++ new/yast2-installation-2.16.41/src/clients/desktop_finish.ycp 2008-04-28 17:51:11.000000000 +0200
@@ -8,7 +8,7 @@
* Authors:
* Jiri Srain
*
- * $Id: desktop_finish.ycp 46904 2008-04-21 12:47:29Z locilka $
+ * $Id: desktop_finish.ycp 47130 2008-04-28 15:51:10Z locilka $
*
*/
@@ -68,84 +68,44 @@
// installed packages
if ( !Mode::update () )
{
- map > desktop_data = $[
- "gnome" : $[
- "package" : ["gdm"],
- "wm" : "gnome",
- "dm" : "gdm",
- "cursor" : "DMZ",
- ],
- "kde" : $[
- "package" : ["kde4-kdm"],
- "wm" : "kde",
- "dm" : "kdm",
- "cursor" : "DMZ",
- ],
- "kde3" : $[
- "package" : ["kdebase3-kdm"],
- "wm" : "kde",
- "dm" : "kdm",
- "cursor" : "DMZ",
- ],
- "twm" : $[
- "package" : ["xorg-x11"],
- "wm" : "",
- "dm" : "xdm",
- "cursor" : "DMZ",
- ],
- ];
-
- string default_wm = "gnome";
- string default_dm = "gdm";
- string default_cursor = "DMZ";
-
- string selected_desktop = DefaultDesktop::Desktop ();
-
- list <string> selected_desktops = DefaultDesktop::SelectedDesktops();
-
- list <string> desktop_order = ["gnome", "kde", "kde3"];
-
- boolean desktop_found = false;
- string pattern_desktop = "gnome";
-
- // check what packages are in the patterns
- // and adjust logon and window manager according to it
- foreach (string d, desktop_order, {
- if (contains (selected_desktops, d)) {
- pattern_desktop = d;
- desktop_found = true;
- y2milestone ("Setting desktop according to pattern to %1", pattern_desktop);
- break;
- }
- });
+ map dd_map = DefaultDesktop::GetAllDesktopsMap ();
+
+ string selected_desktop = DefaultDesktop::Desktop();
+ y2milestone ("Selected desktop: %1", selected_desktop);
+
+ if (selected_desktop == nil || selected_desktop == "")
+ selected_desktop = "gnome";
+
+ string default_dm = "";
+ string default_wm = "";
+ string default_cursor = "";
+
+ list <string> desktop_order = [DefaultDesktop::Desktop(), "gnome", "kde", "kde3", "xfce", "min_x", "textmode"];
- // if no desktop was found according to pattern, try
- // installed packages
- // first the logon manager
- desktop_order = add (desktop_order, "twm");
- desktop_order = prepend (desktop_order, pattern_desktop);
- desktop_found = false;
+ boolean desktop_found = false;
- foreach (string d, desktop_order, {
- if (desktop_found) break;
+ foreach (string d, desktop_order, {
+ if (desktop_found)
+ break;
- foreach (string package, desktop_data[d, "package"]:[], {
+ foreach (string package, dd_map[d, "packages"]:[], {
if (Pkg::IsProvided (package) && (Pkg::PkgInstalled (package) || Pkg::IsSelected (package))) {
y2milestone ("package %1 selected or installed", package);
desktop_found = true;
- default_dm = desktop_data[d, "dm"]:"";
+
+ default_dm = dd_map[d, "logon"]:"";
y2milestone ("Setting logon manager %1 - package selected", default_dm);
- default_wm = desktop_data[d, "wm"]:"";
+
+ default_wm = dd_map[d, "desktop"]:"";
y2milestone ("Setting window manager %1 - package selected", default_wm);
- default_cursor = desktop_data[d, "cursor"]:default_cursor;
+
+ default_cursor = dd_map[d, "cursor"]:default_cursor;
y2milestone ("Setting cursor theme %1 - package selected", default_cursor);
+ } else {
+ y2milestone ("Package %1 for desktop %2 not selected or installed, trying next desktop...", package, d);
}
-
- y2milestone ("Package %1 not selected or installed, trying next desktop...", package);
});
-
- return desktop_found;
- });
+ });
y2milestone ("Default desktop: %1", default_wm);
y2milestone ("Default logon manager: %1", default_dm);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.40/src/clients/inst_deploy_image.ycp new/yast2-installation-2.16.41/src/clients/inst_deploy_image.ycp
--- old/yast2-installation-2.16.40/src/clients/inst_deploy_image.ycp 2008-04-24 15:23:16.000000000 +0200
+++ new/yast2-installation-2.16.41/src/clients/inst_deploy_image.ycp 2008-04-28 16:25:06.000000000 +0200
@@ -227,7 +227,11 @@
SourceManager::InstInitSourceMoveDownloadArea();
-ImageInstallation::DeployImages (images, Installation::destdir, nil);
+boolean dep_ret = ImageInstallation::DeployImages (images, Installation::destdir, nil);
+if (dep_ret == nil) {
+ y2milestone ("Aborting...");
+ return `abort;
+}
y2milestone ("Target image for package selector prepared");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.40/src/clients/inst_extrasources.ycp new/yast2-installation-2.16.41/src/clients/inst_extrasources.ycp
--- old/yast2-installation-2.16.40/src/clients/inst_extrasources.ycp 2008-04-17 11:08:36.000000000 +0200
+++ new/yast2-installation-2.16.41/src/clients/inst_extrasources.ycp 2008-04-28 15:49:52.000000000 +0200
@@ -3,14 +3,11 @@
* Package: yast2-installation
* Summary: Automatically register software repositories from content file
* Authors: Ladislav Slezák
+ * Lukas Ocilka
*
* Assumptions:
- * - the sources and target must be initialized in this script
- * (bugzilla #263289)
* - the sources will be saved afterwards
* (which means that running this client alone will not work)
- * - the added sources are disabled by default and they are added
- * in offline mode (no metadata is dowloaded)
*
* $Id$
*/
@@ -23,105 +20,74 @@
import "SourceManager";
import "Mode";
import "PackageLock";
-
-// the tag providing location of the additional sources in content file
-string content_file_tag = "EXTRAURLS";
-string optional_tag = "OPTIONALURLS";
+import "ProductFeatures";
+// We need the constructor
+import "ProductControl";
/**
- * Dowload and parse content files from current installation sources
+ * Returns list of maps of repositories to register. See bnc #381360.
+ *
* @param registered URLs of already registered repositories (they will be ignored to not register the same repository one more)
- * @return list<string> Extra URLs to register
+ * @return list <map> of URLs to register
*/
-define list<string> GetExtraURLs(list<string> registered)
+define list <map> GetURLsToRegister (list <string> registered)
{
- list<string> extra_urls = [];
-
- list<map> products = Pkg::ResolvableProperties("", `product, "");
- y2milestone("Products: %1", products);
-
- foreach(map product, products,
- {
- // get the extra sources
- list<string> extra = (list<string>)product["extra_urls"]:[];
- list<string> optional = (list<string>)product["optional_urls"]:[];
-
- if (size(extra) > 0)
- {
- foreach(string url, extra,
- {
- // is the URL already registered?
- if (!contains(registered, url))
- {
- extra_urls = add(extra_urls, url);
- }
- else
- {
- y2milestone("Source %1 is already registered", url);
- }
- }
- );
- }
+ list <map> urls_from_control_file = (list <map>) ProductFeatures::GetFeature ("software", "extra_urls");
- if (size(optional) > 0)
- {
- foreach(string url, optional,
- {
- // is the URL already registered?
- if (!contains(registered, url))
- {
- extra_urls = add(extra_urls, url);
- }
- else
- {
- y2milestone("Source %1 is already registered", url);
- }
- }
- );
+ if (urls_from_control_file == nil) {
+ y2milestone ("Empty or errorneous software/extra_urls: %1", urls_from_control_file);
+ return [];
+ }
- }
+ urls_from_control_file = filter (map one_url, urls_from_control_file, {
+ if (contains (registered, one_url["baseurl"]:"")) {
+ y2milestone ("Already registered: %1", one_url["baseurl"]:"");
+ return false;
}
- );
+ return true;
+ });
- y2milestone("Extra sources: %1", extra_urls);
- return extra_urls;
+ y2milestone ("Repositories to register: %1", urls_from_control_file);
+ return urls_from_control_file;
}
/**
* Register the installation sources in offline mode (no network connection required).
* The repository metadata will be downloaded by sw_single (or another yast module) when the repostory is enabled
- * @param url_list list of the sources to register
+ *
+ * @param list <map> list of the sources to register
* @return list<integer> list of created source IDs
*/
-define list<integer> RegisterRepos(list<string> url_list)
+define list <integer> RegisterRepos (list <map> url_list)
{
- list<integer> ret = [];
- y2milestone("Repositories to register: %1", url_list);
+ list <integer> ret = [];
- foreach(string new_url, url_list,
- {
- // map with repository parameters: $[ "enabled" : boolean,
- // "autorefresh" : boolean, "name" : string, "alias" : string,
- // "base_urls" : list<string>, "prod_dir" : string, "type" : string ]
- map repo_prop = $[];
+ foreach (map new_url, url_list, {
+ map repo_prop = $[];
// extra repos are disabled by default
- repo_prop["enabled"] = false;
- repo_prop["autorefresh"] = true;
- repo_prop["name"] = new_url;
- repo_prop["alias"] = new_url;
- repo_prop["base_urls"] = [ new_url ];
+ repo_prop["enabled"] = new_url["enabled"]:false;
+ repo_prop["autorefresh"] = new_url["autorefresh"]:true;
- integer new_repo_id = Pkg::RepositoryAdd(repo_prop);
+ repo_prop["name"] = new_url["baseurl"]:"";
+ repo_prop["alias"] = new_url["baseurl"]:"";
- if (new_repo_id >= 0)
- {
- y2milestone("Registered extra repository: %1: %2", new_repo_id, repo_prop);
+ repo_prop["base_urls"] = [new_url["baseurl"]:""];
- ret = add(ret, new_repo_id);
+ if (haskey (new_url, "prod_dir")) {
+ repo_prop["prod_dir"] = new_url["prod_dir"]:"/";
}
- else
- {
+
+ if (haskey (new_url, "priority")) {
+ repo_prop["priority"] = new_url["priority"]:99;
+ }
+
+ integer new_repo_id = Pkg::RepositoryAdd (repo_prop);
+
+ if (new_repo_id != nil && new_repo_id >= 0) {
+ y2milestone ("Registered extra repository: %1: %2", new_repo_id, repo_prop);
+ ret = add (ret, new_repo_id);
+ } else {
y2error("Cannot register: %1", repo_prop);
}
}
@@ -130,6 +96,11 @@
return ret;
}
+/**
+ * Returns list of already registered repositories.
+ *
+ * @return list <string> of registered repositories
+ */
list<string> RegisteredUrls()
{
// get all registered installation sources
@@ -192,18 +163,15 @@
list <string> already_registered = RegisteredUrls();
-// $[ string url : boolean default ]
-list<string> register_url = GetExtraURLs(already_registered);
+list <map> register_url = GetURLsToRegister (already_registered);
// any confirmed source to register?
-if (size(register_url) > 0)
-{
+if (size (register_url) > 0) {
// register (create) the sources
- list<integer> added_ids = RegisterRepos(register_url);
+ list <integer> added_ids = RegisterRepos (register_url);
// synchronize the sources if any source has been added
- if (size(added_ids) > 0)
- {
+ if (size (added_ids) > 0) {
y2milestone ("syncing to zmd");
boolean synced = SourceManager::SyncAddedAndDeleted (added_ids, []);
y2milestone ("sync status: %1", synced);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.40/src/clients/inst_proposal.ycp new/yast2-installation-2.16.41/src/clients/inst_proposal.ycp
--- old/yast2-installation-2.16.40/src/clients/inst_proposal.ycp 2008-04-22 17:15:28.000000000 +0200
+++ new/yast2-installation-2.16.41/src/clients/inst_proposal.ycp 2008-04-28 17:51:11.000000000 +0200
@@ -7,7 +7,7 @@
* Jiri Srain
* Lukas Ocilka
*
- * $Id: inst_proposal.ycp 46959 2008-04-22 15:12:55Z locilka $
+ * $Id: inst_proposal.ycp 47130 2008-04-28 15:51:10Z locilka $
*
* Create and display reasonable proposal for basic
* installation and call sub-workflows as required
@@ -204,6 +204,36 @@
return description;
};
+ void SubmoduleHelp (map & prop_map, string & submod) {
+ if (haskey (prop_map, "help"))
+ {
+ boolean use_this_help = false;
+ // using tabs
+ if (haskey (mod2tab, submod)) {
+ // visible in the current tab
+ if (mod2tab[submod]:999 == current_tab) {
+ use_this_help = true;
+ }
+ // not using tabs
+ } else {
+ use_this_help = true;
+ }
+
+ if (use_this_help) {
+ y2milestone("Submodule '%1' has it's own help", submod);
+ string own_help = prop_map["help"]:"";
+
+ if (own_help == nil) {
+ y2error ("Help text cannot be 'nil'");
+ } else if (own_help == "") {
+ y2milestone ("Skipping empty help");
+ } else {
+ submodule_helps[submod] = prop_map["help"]:"";
+ }
+ }
+ }
+ }
+
/**
* Call each submodule's MakeProposal() function in turn and display the
@@ -224,6 +254,9 @@
link2submod = $[];
+ UI::ReplaceWidget (`id ("inst_proposal_progress"), `ProgressBar (`id ("pb_ip"), "", 2 * size (submodules), 0));
+ integer submodule_nr = 0;
+
html = $[];
foreach ( string submod, submodules, ``{
string prop = "";
@@ -258,6 +291,9 @@
y2debug("Submodules list before execution: %1", submodules );
foreach ( string submod, submodules,
``{
+ submodule_nr = submodule_nr + 1;
+ UI::ChangeWidget (`id ("pb_ip"), `Value, submodule_nr);
+
string prop = "";
if ( ! skip_the_rest )
{
@@ -276,36 +312,8 @@
titles[no]:_("ERROR: Missing Title"));
}
- prop_map = submod_make_proposal( submod, force_reset, language_changed );
-
- if (haskey (prop_map, "help"))
- {
- boolean use_this_help = false;
- // using tabs
- if (haskey (mod2tab, submod)) {
- // visible in the current tab
- if (mod2tab[submod]:999 == current_tab) {
- use_this_help = true;
- }
- // not using tabs
- } else {
- use_this_help = true;
- }
-
- if (use_this_help) {
- y2milestone("Submodule '%1' has it's own help", submod);
- string own_help = prop_map["help"]:"";
-
- if (own_help == nil) {
- y2error ("Help text cannot be 'nil'");
- } else if (own_help == "") {
- y2milestone ("Skipping empty help");
- } else {
- submodule_helps[submod] = prop_map["help"]:"";
- }
- }
- }
-
+ prop_map = submod_make_proposal (submod, force_reset, language_changed);
+ SubmoduleHelp (prop_map, submod);
// check if it is needed to switch to another tab
// because of an error
@@ -368,6 +376,9 @@
{
skip_the_rest = true;
}
+
+ submodule_nr = submodule_nr + 1;
+ UI::ChangeWidget (`id ("pb_ip"), `Value, submodule_nr);
});
// FATE #301151: Allow YaST proposals to have help texts
@@ -398,6 +409,7 @@
// now do the display-only proposals
+ UI::ReplaceWidget (`id ("inst_proposal_progress"), `Empty());
Wizard::EnableNextButton ();
UI::NormalCursor();
};
@@ -543,38 +555,6 @@
get_submod_descriptions_and_build_menu();
};
-
- /**
- * Load a list of submodules. Try loading it from a file named 'file_name'
- * from one of several predefined directories. If there is no such list,
- * use 'fallback_list'.
- *
- * @param file_name YCP file name to load from
- * @param fallback_list fallback list of submodule names (strings)
- * @return submodules_list list of submodule names (strings)
- **/
-
- /* OBSOLETE CODE
- define list load_submodules_list( string file_name, list fallback_list ) ``{
-
- list submodules = (list) SCR::Read(.target.ycp, [ file_name, [] ] );
-
- if ( submodules == [] )
- {
- submodules = (list) SCR::Read(.target.yast2, [ file_name, [] ] );
- }
-
- if ( submodules == [] )
- {
- submodules = fallback_list;
- }
-
- return submodules;
- };
-
- */
-
-
/**
* Load a list of submodules matching the current internal states
*
@@ -735,7 +715,7 @@
);
/* change menu */
- term menu_box =
+ term menu_box = `VBox (
`HBox (
`HStretch (),
`ReplacePoint(`id(`rep_menu),
@@ -743,7 +723,9 @@
`MenuButton(`id(`menu_dummy), _("&Change..."), [`item(`id(`dummy), "" ) ] )
),
`HStretch ()
- );
+ ),
+ `ReplacePoint (`id ("inst_proposal_progress"), `Empty())
+ );
term vbox = nil;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.40/src/modules/ImageInstallation.ycp new/yast2-installation-2.16.41/src/modules/ImageInstallation.ycp
--- old/yast2-installation-2.16.40/src/modules/ImageInstallation.ycp 2008-04-24 12:59:03.000000000 +0200
+++ new/yast2-installation-2.16.41/src/modules/ImageInstallation.ycp 2008-04-28 16:23:48.000000000 +0200
@@ -24,6 +24,7 @@
import "String";
import "Arch";
import "PackageCallbacks";
+import "Popup";
textdomain "installation";
@@ -234,6 +235,9 @@
// Otherwise it will never make 100%
integer better_feeling_constant = _checkpoint;
+ any ret = nil;
+ boolean aborted = false;
+
while (SCR::Read (.process.running, pid) == true) {
newline = (string) SCR::Read (.process.read_line_stderr, pid);
@@ -251,12 +255,23 @@
if (tar_image_progress != nil)
tar_image_progress (tointeger (newline) + better_feeling_constant);
} else {
- // FIXME: UI::PollInput
- sleep (200);
+ ret = UI::PollInput();
+ if (ret == `abort || ret == `cancel) {
+ if (Popup::ConfirmAbort (`unusable)) {
+ y2warning ("Aborted!");
+ aborted = true;
+ break;
+ }
+ } else {
+ sleep (200);
+ }
}
}
y2milestone ("Finished");
+ if (aborted)
+ return nil;
+
// adjust labels etc.
if (tar_image_progress != nil)
tar_image_progress (100);
@@ -513,16 +528,27 @@
integer num = -1;
_current_image_from_imageset = -1;
+ boolean aborted = nil;
foreach (string img, images, {
num = num + 1;
if (progress != nil)
progress (num, 0);
- DeployImage (img, target);
+
+ if (DeployImage (img, target) == nil) {
+ aborted = true;
+ y2milestone ("Aborting...");
+ break;
+ }
+
if (progress != nil)
progress (num, 100);
});
+ if (aborted) {
+ return nil;
+ }
+
// unregister downloading progress
if (download_image_progress != nil)
Pkg::CallbackProgressDownload (nil);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.40/VERSION new/yast2-installation-2.16.41/VERSION
--- old/yast2-installation-2.16.40/VERSION 2008-04-25 18:08:01.000000000 +0200
+++ new/yast2-installation-2.16.41/VERSION 2008-04-28 15:58:35.000000000 +0200
@@ -1 +1 @@
-2.16.40
+2.16.41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org