Hello community,
here is the log from the commit of package yast2-installation
checked in at Fri Feb 8 17:23:43 CET 2008.
--------
--- yast2-installation/yast2-installation.changes 2008-02-05 16:05:09.000000000 +0100
+++ /mounts/work_src_done/NOARCH/yast2-installation/yast2-installation.changes 2008-02-07 19:01:12.000000000 +0100
@@ -1,0 +2,21 @@
+Thu Feb 7 14:19:11 CET 2008 - locilka@suse.cz
+
+- Functionality that integrates the just-selected language
+ translation has been moved to integrate_translation_extension
+ client to make it available for other modules.
+- New label for "Show in Fullscreen" button to better match what
+ it really does (bnc #359527).
+- Module InstExtensionImage moved to yast2.
+- Added new disintegrate_all_extensions client that is called at
+ the end of the initial installation to umount and remove all
+ integrated inst-sys extensions.
+- 2.16.18
+
+-------------------------------------------------------------------
+Wed Feb 6 13:23:35 CET 2008 - locilka@suse.cz
+
+- Better /lbin/wget handling in InstExtensionImage.
+- Speed-up inst_complex_welcome optimalizations (e.g., skipping
+ downloading extension already by Linuxrc)
+
+-------------------------------------------------------------------
Old:
----
yast2-installation-2.16.17.tar.bz2
New:
----
yast2-installation-2.16.18.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.f14833/_old 2008-02-08 17:20:39.000000000 +0100
+++ /var/tmp/diff_new_pack.f14833/_new 2008-02-08 17:20:39.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-installation (Version 2.16.17)
+# spec file for package yast2-installation (Version 2.16.18)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,19 +11,19 @@
# norootforbuild
Name: yast2-installation
-Version: 2.16.17
+Version: 2.16.18
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-installation-2.16.17.tar.bz2
+Source0: yast2-installation-2.16.18.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
# URL::MakeParamsFromMap and URL::MakeMapFromParams
BuildRequires: yast2 >= 2.16.25
Requires: autoyast2-installation
-# URL::MakeParamsFromMap and URL::MakeMapFromParams
-Requires: yast2 >= 2.16.25
+# InstExtensionImage module moved to installation
+Requires: yast2 >= 2.16.26
# Required in in the first stage, after
# switching to the installed system, bugzilla #249679
Requires: yast2-bootloader
@@ -70,12 +70,12 @@
Summary: YaST2 - Installation Parts
%package devel-doc
-Version: 2.16.17
+Version: 2.16.18
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-installation-2.16.17.tar.bz2
+Source0: yast2-installation-2.16.18.tar.bz2
Prefix: /usr
Requires: yast2-installation >= 2.15.34
PreReq: %fillup_prereq
@@ -108,7 +108,7 @@
Lukas Ocilka
%prep
-%setup -n yast2-installation-2.16.17
+%setup -n yast2-installation-2.16.18
%build
%{prefix}/bin/y2tool y2autoconf
@@ -174,6 +174,21 @@
%exclude %{prefix}/share/doc/packages/yast2-installation/COPYING
%exclude %{prefix}/share/doc/packages/yast2-installation/README
%changelog
+* Thu Feb 07 2008 locilka@suse.cz
+- Functionality that integrates the just-selected language
+ translation has been moved to integrate_translation_extension
+ client to make it available for other modules.
+- New label for "Show in Fullscreen" button to better match what
+ it really does (bnc #359527).
+- Module InstExtensionImage moved to yast2.
+- Added new disintegrate_all_extensions client that is called at
+ the end of the initial installation to umount and remove all
+ integrated inst-sys extensions.
+- 2.16.18
+* Wed Feb 06 2008 locilka@suse.cz
+- Better /lbin/wget handling in InstExtensionImage.
+- Speed-up inst_complex_welcome optimalizations (e.g., skipping
+ downloading extension already by Linuxrc)
* Tue Feb 05 2008 locilka@suse.cz
- Squashfs image needs to be mounted using '-o loop'.
- Displaying busy cursor when downloading the extension.
++++++ yast2-installation-2.16.17.tar.bz2 -> yast2-installation-2.16.18.tar.bz2 ++++++
++++ 3222 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.16.17/src/clients/disintegrate_all_extensions.ycp new/yast2-installation-2.16.18/src/clients/disintegrate_all_extensions.ycp
--- old/yast2-installation-2.16.17/src/clients/disintegrate_all_extensions.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-2.16.18/src/clients/disintegrate_all_extensions.ycp 2008-02-07 18:03:49.000000000 +0100
@@ -0,0 +1,27 @@
+/**
+ * File:
+ * disintegrate_all_extensions.ycp
+ *
+ * Module:
+ * Installation
+ *
+ * Authors:
+ * Lukas Ocilka
+ *
+ * Summary:
+ * Special client for unloading all downloaded and integrated
+ * language and other inst-sys extensions.
+ * See FATE #302955: 'Split translations out of installation system'.
+ *
+ * $Id:$
+ *
+ */
+{
+ textdomain "installation";
+
+ import "InstExtensionImage";
+
+ InstExtensionImage::DisintegrateAllExtensions();
+
+ return `next;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.16.17/src/clients/installation.ycp new/yast2-installation-2.16.18/src/clients/installation.ycp
--- old/yast2-installation-2.16.17/src/clients/installation.ycp 2008-01-28 16:58:20.000000000 +0100
+++ new/yast2-installation-2.16.18/src/clients/installation.ycp 2008-02-07 18:04:49.000000000 +0100
@@ -60,5 +60,9 @@
// Shutdown the UI
Wizard::CloseDialog();
+ if (Stage::initial()) {
+ WFM::CallFunction ("disintegrate_all_extensions");
+ }
+
return ret;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.16.17/src/clients/inst_complex_welcome.ycp new/yast2-installation-2.16.18/src/clients/inst_complex_welcome.ycp
--- old/yast2-installation-2.16.17/src/clients/inst_complex_welcome.ycp 2008-02-05 16:03:47.000000000 +0100
+++ new/yast2-installation-2.16.18/src/clients/inst_complex_welcome.ycp 2008-02-07 14:17:13.000000000 +0100
@@ -41,7 +41,6 @@
import "Icon";
import "InstData";
import "ProductLicense";
- import "InstExtensionImage";
string language = Language::language;
@@ -71,76 +70,6 @@
}
}
- list <string> available_lang_filenames = [];
-
- string GetLanguageExtensionFilename (string language) {
- list <string> check_for_languages = [language];
-
- // 'en_US' ? add also 'en'
- if (size (language) > 2) {
- check_for_languages = add (check_for_languages, substring (language, 0, 2));
- }
-
- // Default fallback
- string filename = "root.en_US";
-
- foreach (string one_language, check_for_languages, {
- if (contains (available_lang_filenames, one_language)) {
- filename = sformat ("root.%1", one_language);
- y2milestone ("Using %1 for %2", filename, language);
- break;
- }
- });
-
- return filename;
- }
-
- /**
- * Finds out the list of supported languages
- */
- list <string> GetListOfSupportedLangExtensions () {
- list <string> ret = [];
-
- // SUPPLANGS in content file
- string supplangs = (string) SCR::Read (.content.SUPPLANGS);
-
- if (supplangs != nil) {
- ret = splitstring (supplangs, " ");
-
- ret = filter (string one_supplang, ret, {
- return (one_supplang != nil && one_supplang != "");
- });
-
- return ret;
- }
-
- // Fallback: using list of trans-stats
- y2milestone ("No SUPPLANGS defined, using a fallback");
- map cmd = (map) WFM::Execute (.local.bash_output, "ls -1 /usr/lib/YaST2/trans/ | sed 's/\.status//'");
-
- if (cmd["exit"]:-1 != 0) {
- y2error ("Cannot find out list of languages: %1", cmd);
- return [];
- }
-
- // Empty list of trans stats
- string langs_s = cmd["stdout"]:"";
- if (langs_s == nil || langs_s == "") {
- y2milestone ("Empty list: %1", langs_s);
-
- return [];
- }
-
- // Newline-separated langs
- ret = splitstring (langs_s, "\n");
-
- ret = filter (string one_supplang, ret, {
- return (one_supplang != nil && one_supplang != "");
- });
-
- return ret;
- }
-
// ------------------------------------- main part of the client -----------
map argmap = GetInstArgs::argmap();
@@ -271,22 +200,22 @@
`Left (`ReplacePoint (`id (`base_license_rp), `Empty()))
)),
`VSpacing (text_mode ? 0.1 : 0.5),
- `HBox (
+ `MinHeight (1, `HBox (
`Left (`CheckBox (
// TRANSLATORS: check-box
`id (`license_agreement), `opt (`notify), _("I Do &Agree to the License Terms."), InstData::product_license_accepted
)),
`VStretch (),
// TRANSLATORS: button label
- `Right (`PushButton (`id (`show_fulscreen_license), _("Show In Full-Screen...")))
- )
+ `Right (`PushButton (`id (`show_fulscreen_license), _("&Show License...")))
+ ))
)
),
`VWeight (3, `VStretch())
);
- term FullScreenLicenseDialog () {
- return `VBox (
+ term AllLicensesDialog () {
+ return `MinHeight ((text_mode ? 20 : 25), `VBox (
`Left (`HBox (
Icon::Simple ("yast-license"),
// TRANSLATORS: dialog caption
@@ -294,12 +223,9 @@
)),
`VSpacing (text_mode ? 0.1 : 0.5),
`HSpacing (60),
- `MinHeight (
- (text_mode ? 20 : 25),
- `ReplacePoint (`id (`full_screen_license_rp), `Empty())
- ),
+ `ReplacePoint (`id (`full_screen_license_rp), `Empty()),
`PushButton (`id (`close), Label::OKButton())
- );
+ ));
}
string help_text = "";
@@ -408,12 +334,14 @@
// Returns true if the dialog needs redrawing
boolean SetLanguageIfChanged (any ret) {
- if (Stage::initial()) {
- // TRANSLATORS: busy message
- UI::OpenDialog (`Label (_("Downloading installation system language extension...")));
- // FATE #302955: Split translations out of installation system
- InstExtensionImage::DownloadAndIntegrateExtension (GetLanguageExtensionFilename (language));
- UI::CloseDialog();
+ // Only inst-sys and only if a language has been changed right now
+ // and the new language is not the initial one (that one is already downloaded by Linuxrc)
+ if (Stage::initial() && ret == `language) {
+ if (InstData::initial_installation_language != language) {
+ WFM::call ("integrate_translation_extension", [$["requested_language":language]]);
+ } else {
+ y2milestone ("Skipping downloading %1 extension again (initial language)", InstData::initial_installation_language);
+ }
}
if (language != Language::language) {
@@ -493,11 +421,10 @@
return `auto;
}
- // FATE #302955: Split translations out of installation system
- // [ "en_US", "en_GB", "de", "cs" ]
- // they are in content.SUPPLANGS or as files in /usr/lib/YaST2/trans
- available_lang_filenames = GetListOfSupportedLangExtensions();
- y2milestone ("Supported languages are: %1", available_lang_filenames);
+ // Store the initial language
+ if (InstData::initial_installation_language == nil) {
+ InstData::initial_installation_language = Language::language;
+ }
while (true) {
ret = UI::UserInput();
@@ -538,7 +465,7 @@
if (ret == `next) break;
} else if (ret == `show_fulscreen_license) {
- UI::OpenDialog (FullScreenLicenseDialog());
+ UI::OpenDialog (AllLicensesDialog());
ProductLicense::ShowFullScreenLicenseInInstallation (`full_screen_license_rp);
UI::CloseDialog();
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.16.17/src/clients/inst_proposal.ycp new/yast2-installation-2.16.18/src/clients/inst_proposal.ycp
--- old/yast2-installation-2.16.17/src/clients/inst_proposal.ycp 2008-01-29 17:39:56.000000000 +0100
+++ new/yast2-installation-2.16.18/src/clients/inst_proposal.ycp 2008-02-07 18:55:36.000000000 +0100
@@ -7,7 +7,7 @@
* Jiri Srain
* Lukas Ocilka
*
- * $Id: inst_proposal.ycp 43963 2008-01-29 10:40:11Z locilka $
+ * $Id: inst_proposal.ycp 44236 2008-02-07 12:49:39Z visnov $
*
* Create and display reasonable proposal for basic
* installation and call sub-workflows as required
@@ -688,7 +688,7 @@
if ( headline == "")
{
// dialog headline
- headline = _("Installation Settings");
+ headline = _("Installation Overview");
}
else
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.16.17/src/clients/integrate_translation_extension.ycp new/yast2-installation-2.16.18/src/clients/integrate_translation_extension.ycp
--- old/yast2-installation-2.16.17/src/clients/integrate_translation_extension.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-2.16.18/src/clients/integrate_translation_extension.ycp 2008-02-07 15:21:43.000000000 +0100
@@ -0,0 +1,118 @@
+/**
+ * File:
+ * integrate_translation_extension.ycp
+ *
+ * Module:
+ * Installation
+ *
+ * Authors:
+ * Lukas Ocilka
+ *
+ * Summary:
+ * This client downloads and integrates a translation
+ * extension for the current language.
+ * This module needs to be called this way:
+ * WFM::call ("integrate_translation_extension", [$["requested_language":"de_DE"]])
+ *
+ * $Id:$
+ *
+ */
+{
+ textdomain "installation";
+
+ import "InstExtensionImage";
+ import "InstData";
+ import "GetInstArgs";
+
+ /**
+ * Finds out the list of supported languages
+ */
+ list <string> GetListOfSupportedLangExtensions () {
+ list <string> ret = [];
+
+ // SUPPLANGS in content file
+ string supplangs = (string) SCR::Read (.content.SUPPLANGS);
+
+ if (supplangs != nil) {
+ ret = splitstring (supplangs, " ");
+
+ ret = filter (string one_supplang, ret, {
+ return (one_supplang != nil && one_supplang != "");
+ });
+
+ return ret;
+ }
+
+ // Fallback: using list of trans-stats
+ y2milestone ("No SUPPLANGS defined, using a fallback");
+ map cmd = (map) WFM::Execute (.local.bash_output, "ls -1 /usr/lib/YaST2/trans/ | sed 's/\.status//'");
+
+ if (cmd["exit"]:-1 != 0) {
+ y2error ("Cannot find out list of languages: %1", cmd);
+ return [];
+ }
+
+ // Empty list of trans stats
+ string langs_s = cmd["stdout"]:"";
+ if (langs_s == nil || langs_s == "") {
+ y2milestone ("Empty list: %1", langs_s);
+
+ return [];
+ }
+
+ // Newline-separated langs
+ ret = splitstring (langs_s, "\n");
+
+ ret = filter (string one_supplang, ret, {
+ return (one_supplang != nil && one_supplang != "");
+ });
+
+ return ret;
+ }
+
+ string GetLanguageExtensionFilename (string language) {
+ // FATE #302955: Split translations out of installation system
+ // this is lazy init
+ if (InstData::available_lang_filenames == nil || InstData::available_lang_filenames == []) {
+ InstData::available_lang_filenames = GetListOfSupportedLangExtensions();
+ y2milestone ("Supported languages are: %1", InstData::available_lang_filenames);
+ }
+
+ list <string> check_for_languages = [language];
+
+ // 'en_US' ? add also 'en'
+ if (size (language) > 2) {
+ check_for_languages = add (check_for_languages, substring (language, 0, 2));
+ }
+
+ // Default fallback
+ string filename = "root.en_US";
+
+ foreach (string one_language, check_for_languages, {
+ if (contains (InstData::available_lang_filenames, one_language)) {
+ filename = sformat ("root.%1", one_language);
+ break;
+ }
+ });
+
+ y2milestone ("Using %1 for %2", filename, language);
+
+ return filename;
+ }
+
+ y2milestone ("Starting: integrate_translation");
+
+ map argmap = GetInstArgs::argmap();
+ y2milestone ("Args: %1", argmap);
+ string language = argmap["requested_language"]:"en_US";
+
+ // TRANSLATORS: busy message
+ UI::OpenDialog (`Label (_("Downloading installation system language extension...")));
+ // FATE #302955: Split translations out of installation system
+ InstExtensionImage::DownloadAndIntegrateExtension (GetLanguageExtensionFilename (language));
+ UI::CloseDialog();
+
+ y2milestone ("Finished: integrate_translation");
+
+ return `next;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.16.17/src/modules/InstData.ycp new/yast2-installation-2.16.18/src/modules/InstData.ycp
--- old/yast2-installation-2.16.17/src/modules/InstData.ycp 2008-01-14 13:25:38.000000000 +0100
+++ new/yast2-installation-2.16.18/src/modules/InstData.ycp 2008-02-07 13:15:27.000000000 +0100
@@ -37,6 +37,15 @@
global boolean product_license_accepted = false;
+ // when Linuxrc starts the installation, the first language is already selected
+ // and language extension already merged
+ global string initial_installation_language = nil;
+
+ // FATE #302955: Split translations out of installation system
+ // [ "en_US", "en_GB", "de", "cs" ]
+ // they are in content.SUPPLANGS or as files in /usr/lib/YaST2/trans
+ global list <string> available_lang_filenames = [];
+
// <-- other
/* EOF */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.16.17/src/modules/InstExtensionImage.ycp new/yast2-installation-2.16.18/src/modules/InstExtensionImage.ycp
--- old/yast2-installation-2.16.17/src/modules/InstExtensionImage.ycp 2008-02-05 15:59:28.000000000 +0100
+++ new/yast2-installation-2.16.18/src/modules/InstExtensionImage.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,365 +0,0 @@
-/**
- * File: modules/InstExtensionImage.ycp
- * Package: Installation
- * Summary: Functionality downloading and merging extending
- * images for the inst-sys
- * Authors: Lukas Ocilka
- *
- * $Id:$
- *
- * This module provides functions that download inst-sys extension images
- * (localization, fonts, ...) and merge them to the current int-sys.
- * This enables inst-sys to be modular even for running YaST.
- * See FATE #302955: 'Split translations out of installation system'.
- * This module is strictly installation-only!
- */
-
-{
-
- textdomain "installation";
- module "InstExtensionImage";
-
- import "Linuxrc";
- import "URL";
- import "String";
- import "Directory";
- import "FileUtils";
-
- /***
- *
- * Paths where to download inst-sys extension images are taken
- * from '/etc/install.inf'. An extension image contains the
- * directory structure and files as it was in inst-sys but
- * it is a squashfs image of it.
- *
- * Inst-sys URL might be absolute or 'relative' to repo URL,
- * but only if instsys=... parameter wasn't explicitely defined.
- *
- * When instsys=... parameter _is not_ used:
- * * RepoURL: cd:/?device=sr0
- * * InstsysURL: boot/<arch>/root
- * (<arch> is for instance "i386", "x86_64", "ppc")
- * or
- * * RepoURL: nfs://server/repo/url/?device=eth0
- * * InstsysURL: boot/<arch>/root
- *
- * When instsys=... parameter _is_ used:
- * * RepoURL: nfs://server/repo/url/
- * * InstsysURL: http://server/inst-sys/url/
- * or
- * * RepoURL: cd:/?device=sr0
- * * InstsysURL: nfs://server/inst-sys/url/?device=eth0
- *
- * Files to download are in the same level (directory) with
- * inst-sys:
- *
- * * RepoURL: cd:/?device=sr0
- * * InstsysURL: boot/<arch>/root
- * -> cd:/boot/<arch>/$extension_file
- *
- * * RepoURL: nfs://server/repo/url/?device=eth0
- * * InstsysURL: http://server/inst-sys/url/?device=eth0
- * -> http://server/inst-sys/$extension_file?device=eth0
- *
- * These files are always squashfs images that need to be:
- *
- * * Downloaded: /lbin/wget -v $url $local_filename_path
- * * Downloaded file needs to be checked against a SHA1
- * hash defined in /content file
- * * Mounted (-o loop) to a directory.
- * * Directory needs to be merged into inst-sys by using
- * `/lbin/lndir /`
- *
- * This module remembers downloading a file so it does not
- * download any file twice.
- *
- * Additional comments on the "Installation Workflow":
- *
- * * When Linuxrc starts loading an initial translation
- * might already been selected. Linuxrc will download
- * and merge the pre-selected translation itself.
- * * Then Linuxrc starts YaST. YaST initializes itself
- * including translations and displays the language
- * dialog translated.
- * * After a different language is selected, YaST downloads
- * a localization inst-sys extension and merges it.
- * * Then a different locale is selected and YaST redraws
- * reruns the current YCP client.
- */
-
- // nfs://.../, cd:/, http://.../any/
- // always ends with a slash "/"
- string base_url = "";
-
- // if there are any params $url?param1=xx¶m2=...
- // always only params
- string base_url_params = "";
-
- // Directory used for storing images
- string base_tmpdir = sformat ("%1/%2/", Directory::tmpdir, "instsys_extensions");
- // Directory used for mounting images
- string base_mounts = sformat ("%1/%2/", Directory::tmpdir, "instsys_extmounts");
-
- boolean initialized = false;
-
- boolean IsURLRelative (string url) {
- if (url == nil)
- return nil;
-
- // "http://..." -> not-relative
- // "cd:/" -> not relative
- // "boot/i386/root -> relative
- return ! regexpmatch (url, "^[[:alpha:]]+:/");
- }
-
- /**
- * Merges two different URLs, repspectively their parameters
- * to one string with parameters. See the example.
- *
- * @param string base URL with params
- * @param string URL with modifications (added or changed params)
- * @return string merged params
- *
- * @example
- * MergeURLsParams (
- * "http://server.net/dir/?param1=x¶m2=y",
- * "http://server.net/dir/?param2=z¶m3=a",
- * // param2 from the first URL has been replaced by tho one from the second URL
- * ) -> "param1=x¶m2=z¶m3=a"
- */
- string MergeURLsParams (string base_url, string url_with_modifs) {
- if (base_url == nil || url_with_modifs == nil) {
- y2error ("Wrong params: %1 or %2", base_url, url_with_modifs);
- return nil;
- }
-
- // base URL params
- integer base_params_pos = search (base_url, "?");
- string base_params = "";
-
- if (base_params_pos != nil && base_params_pos >= 0) {
- base_params = substring (base_url, (base_params_pos + 1));
- }
-
- // URL params with modifications
- integer modif_params_pos = search (url_with_modifs, "?");
- string modif_params = "";
-
- if (modif_params_pos != nil && modif_params_pos >= 0) {
- modif_params = substring (url_with_modifs, (modif_params_pos + 1));
- }
-
- // Nothing to merge
- if (base_params == "")
- return modif_params;
- if (modif_params == "")
- return base_params;
-
- map base_params_map = URL::MakeMapFromParams (base_params);
- map modif_params_map = URL::MakeMapFromParams (modif_params);
- map final_params_map = (map ) union (base_params_map, modif_params_map);
-
- return URL::MakeParamsFromMap (final_params_map);
- }
-
- /**
- * Removes the last url item.
- *
- * @example
- * CutLastDirOrFile ("http://server/some/dir/") -> "http://server/some/"
- * CutLastDirOrFile ("http://server/some/dir") -> "http://server/some/"
- */
- string CutLastDirOrFile (string url) {
- if (url == nil || url == "" || url == "/" || ! regexpmatch (url, "/")) {
- y2error (-1, "Wrong URL: %1", url);
- return "";
- }
-
- // final "/" is needed for regexp
- if (! regexpmatch (url, "/$")) {
- url = url + "/";
- }
-
- return regexpsub (url, "^(.*)/[^/]+/$", "\\1/");
- }
-
- /**
- * Merges two URLs into one and removes parameters from both.
- * If the second URL is strictly relative, e.g., "boot/i386/root",
- * it is merged with the first one, otherwise the second one is
- * returned (with params cut).
- *
- * @param string base URL
- * @param string modif URL (relative or absolute)
- * @return string merged URL
- *
- * @example
- * MergeURLs (
- * "nfs://server.name/11-repo/?device=eth0&xxx=zzz",
- * "boot/i386/root?device=eth1&aaa=bbb"
- * ) -> "nfs://server.name/11-repo/boot/i386/"
- * MergeURLs (
- * "nfs://server.name/11-repo/?device=eth0&xxx=zzz",
- * "nfs://server2.net/boot/i386/root?device=eth1&aaa=bbb"
- * ) -> "nfs://server2.net/boot/i386/"
- */
- string MergeURLs (string url_base, string url_with_modifs) {
- if (url_base == nil || url_with_modifs == nil) {
- y2error ("Wrong URLs: %1 or %2", url_base, url_with_modifs);
- return nil;
- }
-
- // relative (to base URL) or absolute URL
- integer url_with_modifs_pos = search (url_with_modifs, "?");
- string url_with_modifs_onlyurl = url_with_modifs;
-
- if (url_with_modifs_pos != nil && url_with_modifs_pos >= 0) {
- url_with_modifs_onlyurl = substring (url_with_modifs, 0, url_with_modifs_pos);
- }
-
- // Modif URL is not relative, not using the base URL at all
- if (! IsURLRelative (url_with_modifs_onlyurl)) {
- return CutLastDirOrFile (url_with_modifs_onlyurl);
- }
-
- // base URL
- integer url_base_pos = search (url_base, "?");
- string url_base_onlyurl = url_base;
-
- if (url_base_pos != nil && url_base_pos >= 0) {
- url_base_onlyurl = substring (url_base, 0, url_base_pos);
- }
-
- if (! regexpmatch (url_base_onlyurl, "/$")) {
- url_base_onlyurl = url_base_onlyurl + "/";
- }
-
- return CutLastDirOrFile (url_base_onlyurl + url_with_modifs_onlyurl);
- }
-
- /**
- * Every global function should call LazyInit in the beginning.
- */
- void LazyInit () {
- // already initialized
- if (initialized)
- return;
-
- y2milestone ("Initializing...");
- initialized = true;
-
- // base repo URL
- string repo_url = Linuxrc::InstallInf ("RepoURL");
- // inst-sys URL
- string inst_sys_url = Linuxrc::InstallInf ("InstsysURL");
-
- // non-relative inst-sys, repo is not taken into account
- if (! IsURLRelative (inst_sys_url)) {
- repo_url = "";
- }
-
- // final base URL (last file/dir already removed)
- base_url = MergeURLs (repo_url, inst_sys_url);
- y2milestone ("Base URL: %1", base_url);
-
- // final params
- base_url_params = MergeURLsParams (repo_url, inst_sys_url);
- y2milestone ("Base URL params: %1", base_url_params);
-
- map run = (map) WFM::Execute (.local.bash_output,
- sformat ("/bin/mkdir -p '%1'", String::Quote (base_tmpdir))
- );
- if (run["exit"]:-1 != 0) {
- y2error ("Cannot create temporary directory: %1: %2", base_tmpdir, run);
- }
-
- run = (map) WFM::Execute (.local.bash_output,
- sformat ("/bin/mkdir -p '%1'", String::Quote (base_mounts))
- );
- if (run["exit"]:-1 != 0) {
- y2error ("Cannot create mounts directory: %1: %2", base_mounts, run);
- }
- }
-
- // Already downloaded (and mounted and merged) files
- list <string> already_downloaded_files = [];
-
- /**
- * Downloads extension archive (file system image) and integrates
- * it to the current system.
- *
- * @param string extension name
- * @return boolean if successful
- */
- global boolean DownloadAndIntegrateExtension (string extension) {
- if (extension == nil || extension == "") {
- y2error ("Such extension name can't work: %1", extension);
- }
-
- // Every single GLOBAL function has to use LazyInit!
- LazyInit();
-
- // download from
- // extension='aaa' -> http://inst_base_url/aaa/?base_url_params
- string extension_url = sformat ("%1%2?%3", base_url, extension, base_url_params);
-
- // download to extension='aaa' -> /tmp/YaST.SomeMoreLetters/special/dir/aaa
- string extension_localfile = sformat ("%1%2", base_tmpdir, extension);
-
- if (contains (already_downloaded_files, extension_url)) {
- y2milestone ("File %1 has already been downloaded", extension_url);
- return true;
- }
-
- // Downloading the extension
- string cmd = sformat ("/lbin/wget -v '%1' '%2'", String::Quote (extension_url), String::Quote (extension_localfile));
- map cmd_run = (map) WFM::Execute (.local.bash_output, cmd);
-
- if (cmd_run["exit"]:-1 != 0 || ! FileUtils::Exists (extension_localfile)) {
- y2error ("Cannot download extension '%1': %2", cmd, cmd_run);
- return false;
- } else {
- already_downloaded_files = add (already_downloaded_files, extension_url);
- y2milestone ("Downloaded: %1 -> %2 (size: %3)", extension_url, extension_localfile, FileUtils::GetSize (extension_localfile));
- }
-
- // FIXME: Check SHA1sum against /content file
-
- // Creating subdir for extension to be mounted
- string extension_mount = sformat ("%1%2/", base_mounts, extension);
- cmd_run = (map) WFM::Execute (.local.bash_output,
- sformat ("/bin/mkdir -p '%1'", String::Quote (extension_mount))
- );
-
- if (cmd_run["exit"]:-1 != 0) {
- y2error ("Cannot create mounts directory: %1: %2", base_mounts, cmd_run);
- return false;
- }
-
- // Mounting the extension
- cmd = sformat ("/bin/mount -o loop '%1' '%2'", String::Quote (extension_localfile), String::Quote (extension_mount));
- cmd_run = (map) WFM::Execute (.local.bash_output, cmd);
-
- if (cmd_run["exit"]:-1 != 0) {
- y2error ("Cannot mount extension '%1': %2", cmd, cmd_run);
- return false;
- } else {
- y2milestone ("Mounted: %1 -> %2", extension_localfile, extension_mount);
- }
-
- // Link items in the mounted directory to inst-sys
- string where_to_lndir = "/";
- cmd = sformat ("/lbin/lndir '%1' '%2'", String::Quote (extension_mount), String::Quote (where_to_lndir));
- cmd_run = (map) WFM::Execute (.local.bash_output, cmd);
-
- if (cmd_run["exit"]:-1 != 0) {
- y2error ("Cannot >lndir '%1': %2", cmd, cmd_run);
- return false;
- } else {
- y2milestone ("Lndir successful: %1 to %2", extension_mount, where_to_lndir);
- }
-
- return true;
- }
-/* EOF */
-}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.16.17/VERSION new/yast2-installation-2.16.18/VERSION
--- old/yast2-installation-2.16.17/VERSION 2008-02-05 16:04:11.000000000 +0100
+++ new/yast2-installation-2.16.18/VERSION 2008-02-07 19:02:22.000000000 +0100
@@ -1 +1 @@
-2.16.17
+2.16.18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org