Hello community,
here is the log from the commit of package yast2-installation
checked in at Fri Apr 4 01:10:16 CEST 2008.
--------
--- yast2-installation/yast2-installation.changes 2008-04-01 17:25:36.000000000 +0200
+++ /mounts/work_src_done/NOARCH/yast2-installation/yast2-installation.changes 2008-04-03 19:40:39.000000000 +0200
@@ -1,0 +2,14 @@
+Wed Apr 3 16:40:16 CEST 2008 - locilka@suse.cz
+
+- Removed Winkeys support during installation (bnc 376248).
+- Fixed the decision-making process which images fits the best.
+- Added new control file entries to adjust the Community
+ Repositories and Add-Ons during installation.
+- Cosmetic changes when initializing the wizard steps according to
+ control file.
+- Fixed untarring bzip2 or gzip-based images.
+- Changed instalation from images to count the best image-set
+ from patterns (list of patterns in image-set) in images.xml.
+- 2.16.29
+
+-------------------------------------------------------------------
Old:
----
yast2-installation-2.16.28.tar.bz2
New:
----
yast2-installation-2.16.29.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.E24445/_old 2008-04-04 01:09:39.000000000 +0200
+++ /var/tmp/diff_new_pack.E24445/_new 2008-04-04 01:09:39.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-installation (Version 2.16.28)
+# spec file for package yast2-installation (Version 2.16.29)
#
# 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.28
+Version: 2.16.29
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-installation-2.16.28.tar.bz2
+Source0: yast2-installation-2.16.29.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
# anyxml -> barexml (bnc #366867)
@@ -105,7 +105,7 @@
Lukas Ocilka
%prep
-%setup -n yast2-installation-2.16.28
+%setup -n yast2-installation-2.16.29
%build
%{prefix}/bin/y2tool y2autoconf
@@ -171,6 +171,17 @@
%exclude %{prefix}/share/doc/packages/yast2-installation/COPYING
%exclude %{prefix}/share/doc/packages/yast2-installation/README
%changelog
+* Thu Apr 03 2008 locilka@suse.cz
+- Removed Winkeys support during installation (bnc 376248).
+- Fixed the decision-making process which images fits the best.
+- Added new control file entries to adjust the Community
+ Repositories and Add-Ons during installation.
+- Cosmetic changes when initializing the wizard steps according to
+ control file.
+- Fixed untarring bzip2 or gzip-based images.
+- Changed instalation from images to count the best image-set
+ from patterns (list of patterns in image-set) in images.xml.
+- 2.16.29
* Tue Apr 01 2008 locilka@suse.cz
- Automatic configuration can be newly defined by control file. Two
new variables have been added enable_autoconfiguration and
++++++ yast2-installation-2.16.28.tar.bz2 -> yast2-installation-2.16.29.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.28/src/clients/inst_doit.ycp new/yast2-installation-2.16.29/src/clients/inst_doit.ycp
--- old/yast2-installation-2.16.28/src/clients/inst_doit.ycp 2007-05-18 10:44:04.000000000 +0200
+++ new/yast2-installation-2.16.29/src/clients/inst_doit.ycp 2008-04-03 19:40:19.000000000 +0200
@@ -6,7 +6,7 @@
*
* Purpose: Asks user to really do the installation/update.
*
- * $Id: inst_doit.ycp 37333 2007-04-05 11:36:24Z locilka $
+ * $Id: inst_doit.ycp 46058 2008-04-03 17:40:19Z locilka $
*/
{
textdomain "installation";
@@ -31,8 +31,23 @@
// bugzilla #219097
boolean confirmed = confirmInstallation();
- if ( confirmed )
- y2milestone( "User confirmed %1", Mode::update () ? "update" : "installation" );
+ if (confirmed) {
+ y2milestone ("User confirmed %1",
+ Mode::update () ? "update" : "installation");
+
+ Wizard::SetContents (
+ // TRANSLATORS: dialog caption
+ _("Installation - Warming Up"),
+ `VBox (
+ // FIXME: invent something better :>>> zzz
+ `Label (_("Drzte si klobouky, jedeme z kopceeee...."))
+ ),
+ // TRANSLATORS: dialog help
+ _("<p>Installation is just about to start!</p>"),
+ false,
+ false
+ );
+ }
return confirmed ? `next : `back;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.28/src/clients/inst_finish.ycp new/yast2-installation-2.16.29/src/clients/inst_finish.ycp
--- old/yast2-installation-2.16.28/src/clients/inst_finish.ycp 2008-04-01 13:11:10.000000000 +0200
+++ new/yast2-installation-2.16.29/src/clients/inst_finish.ycp 2008-04-03 16:40:10.000000000 +0200
@@ -6,7 +6,7 @@
* Arvin Schnell
* Jiri Srain
*
- * $Id: inst_finish.ycp 45921 2008-04-01 09:38:27Z jsrain $
+ * $Id: inst_finish.ycp 46043 2008-04-03 14:40:09Z locilka $
*
* Writes:
* [target] /var/lib/YaST2/runme_at_boot run yast2 after initial boot
@@ -169,7 +169,9 @@
list<map> steps = maplist (string s, stage["steps"]:[], {
s = s + "_finish";
+ y2milestone ("Calling inst_finish script: %1 (Info)", s);
// TODO: check if client exists
+// client doesn't need to exist on purpose
map info = (map)WFM::CallFunction (s, ["Info"]);
if (info == nil) {
@@ -185,12 +187,19 @@
steps_count = steps_count + info["steps"]:1;
return info;
});
+
stage["steps"] = filter (map s, steps, {
return s != nil;
});
+
return stage;
});
+y2milestone ("These inst_finish stages will be called:");
+foreach (map stage, stages, {
+ y2milestone ("Stage: %1", stage);
+});
+
stages = filter (map s, stages, {
return size (s["steps"]:[]) > 0;
});
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.28/src/clients/inst_worker_initial.ycp new/yast2-installation-2.16.29/src/clients/inst_worker_initial.ycp
--- old/yast2-installation-2.16.28/src/clients/inst_worker_initial.ycp 2008-03-14 15:17:37.000000000 +0100
+++ new/yast2-installation-2.16.29/src/clients/inst_worker_initial.ycp 2008-04-03 14:44:15.000000000 +0200
@@ -54,12 +54,11 @@
// All stages
SetUIContent();
+ SetDiskActivationModule();
+
// Cleanup and other settings
InitFirstStageInstallationSystem();
- SetDiskActivationModule();
- AdjustStepsAccordingToInstallationSettings();
-
// Redraw steps before mouse is initialized
// Bugzilla #296406
UpdateWizardSteps ();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.28/src/config/preferences.yast2 new/yast2-installation-2.16.29/src/config/preferences.yast2
--- old/yast2-installation-2.16.28/src/config/preferences.yast2 2008-03-10 11:25:50.000000000 +0100
+++ new/yast2-installation-2.16.29/src/config/preferences.yast2 2008-04-02 18:15:32.000000000 +0200
@@ -13,6 +13,9 @@
KeySysSwitchNext="Alt+Tab"
KeySysSwitchLast="Alt+Shift+Tab"
+# Disable Windows key
+Win95Keys=0
+
# Colors
ColorActiveTitleBar="rgb:4e/6f/9f"
ColorNormalTitleBar="rgb:c3/c3/c3"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.28/src/include/inst_inc_first.ycp new/yast2-installation-2.16.29/src/include/inst_inc_first.ycp
--- old/yast2-installation-2.16.28/src/include/inst_inc_first.ycp 2008-04-01 12:55:05.000000000 +0200
+++ new/yast2-installation-2.16.29/src/include/inst_inc_first.ycp 2008-04-03 14:54:00.000000000 +0200
@@ -37,15 +37,55 @@
* Sets inital language and other settings.
*/
void SetInitialInstallation () {
+ y2milestone ("Adjusting language settings");
+ UI::SetLanguage (Language::language, Installation::encoding);
+ WFM::SetLanguage (Language::language, "UTF-8");
+ UI::RecordMacro (Directory::logdir + "/macro_inst_initial.ycp");
+
// properly set up initial language
Installation::encoding = Console::SelectFont (Language::language);
if (UI::GetDisplayInfo()["HasFullUtf8Support"]:true) {
Installation::encoding = "UTF-8";
}
-
- ProductControl::DisableModule ("add-on");
- ProductControl::DisableModule ("productsources");
+ y2milestone ("Adjusting first stage modules");
+
+ boolean show_addons = ProductFeatures::GetBooleanFeature ("globals", "show_addons");
+ boolean addons_default = ProductFeatures::GetBooleanFeature ("globals", "addons_default");
+ // default fallback
+ if (show_addons == nil) show_addons = true;
+ if (addons_default == nil) addons_default = false;
+
+ y2milestone ("Control file definition for add-on, visible: %1, selected: %2",
+ show_addons, addons_default);
+ if (show_addons) {
+ ProductControl::DisableModule ("add-on");
+ } else {
+ ProductControl::EnableModule ("add-on");
+ }
+ Installation::add_on_selected = addons_default;
+
+ boolean show_online_repositories = ProductFeatures::GetBooleanFeature ("globals", "show_online_repositories");
+ boolean online_repositories_default = ProductFeatures::GetBooleanFeature ("globals", "online_repositories_default");
+ // default fallback
+ if (show_online_repositories == nil) show_online_repositories = false;
+ if (online_repositories_default == nil) online_repositories_default = true;
+
+ y2milestone ("Control file definition for productsources, visible: %1, selected: %2",
+ show_online_repositories, online_repositories_default);
+ if (show_online_repositories) {
+ ProductControl::EnableModule ("productsources");
+ } else {
+ ProductControl::DisableModule ("productsources");
+ }
+ Installation::productsources_selected = online_repositories_default;
+
+ y2milestone ("Disabling second stage modules");
+ // First-stage users module will enable them again only if needed
+ ProductControl::DisableModule ("root");
+ ProductControl::DisableModule ("user");
+ ProductControl::DisableModule ("auth");
+ y2milestone ("Adjusting automatic configuration");
// FATE #303396, Make second stage non-interactive
boolean enable_autoconfiguration = ProductFeatures::GetBooleanFeature ("globals", "enable_autoconfiguration");
boolean autoconfiguration_default = ProductFeatures::GetBooleanFeature ("globals", "autoconfiguration_default");
@@ -56,15 +96,6 @@
ProductControl::SetUseAutomaticConfiguration (autoconfiguration_default == true);
// Enables or disables some modules, etc.
AdjustAutomaticInstallation();
-
- // First-stage users module will enable them again only if needed
- ProductControl::DisableModule ("root");
- ProductControl::DisableModule ("user");
- ProductControl::DisableModule ("auth");
-
- UI::SetLanguage (Language::language, Installation::encoding);
- WFM::SetLanguage (Language::language, "UTF-8");
- UI::RecordMacro (Directory::logdir + "/macro_inst_initial.ycp");
}
void InitFirstStageInstallationSystem () {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.28/src/modules/ImageInstallation.ycp new/yast2-installation-2.16.29/src/modules/ImageInstallation.ycp
--- old/yast2-installation-2.16.28/src/modules/ImageInstallation.ycp 2008-04-01 15:48:12.000000000 +0200
+++ new/yast2-installation-2.16.29/src/modules/ImageInstallation.ycp 2008-04-03 17:42:35.000000000 +0200
@@ -140,7 +140,7 @@
cmd = sformat ("lzmadec < '%1' | tar --totals -C '%2' -xf -", String::Quote (image), String::Quote (target));
// bzip2, gzip
} else {
- cmd = sformat ("tar --totals -xf '%1' -C -xf '%2'", String::Quote (image), String::Quote (target));
+ cmd = sformat ("tar --totals -C '%2' -xf '%1'", String::Quote (image), String::Quote (target));
}
y2milestone ("Calling: %1", cmd);
@@ -312,40 +312,19 @@
// TODO error checking
}
-// TODO: extract the weight from control file
-list <string> patterns_priority = ["^kde", "^gnome", "^xfce", "^x11", "^base", "^enhanced_base"];
-
/**
- * Function finds a pattern weight
- * The return value is 0 to 9999. The smaller the number the bigger the weight.
- *
- * @param string pattern
- * @return integer pattern weight
+ * Returns the intersection of both patterns supported by the imageset
+ * and patterns going to be installed.
*/
-integer GetPatternWeight (string pattern) {
- integer weight = 9999;
+integer CountMatchingPatterns (list <string> imageset_patterns, list <string> installed_patterns) {
+ integer ret = 0;
- integer counter = -1;
- foreach (string one_pattern_regexp, patterns_priority, {
- counter = counter + 1;
- if (regexpmatch (pattern, one_pattern_regexp)) {
- weight = counter;
- break;
- }
+ foreach (string one_installed_pattern, installed_patterns, {
+ if (contains (imageset_patterns, one_installed_pattern))
+ ret = ret + 1;
});
- return weight;
-}
-
-/**
- * Patterns have an internal weight. It says which one of two is better
- * to use for image installation. The size does matter.
- */
-boolean DoesPatternFitBetter (string last_pattern, string new_pattern) {
- integer last_pattern_weight = GetPatternWeight (last_pattern);
- integer new_pattern_weight = GetPatternWeight (new_pattern);
-
- return (new_pattern_weight < last_pattern_weight);
+ return ret;
}
/**
@@ -384,41 +363,38 @@
// more patterns could match at once
// as we can't merge the meta image, only one can be selected
map > possible_patterns = $[];
- map matching_pattern_sizes = $[];
+ map matching_patterns = $[];
// trying to find all matching patterns
foreach (map image, image_sets, {
- string pattern = image["pattern"]:"";
+ string pattern = image["patterns"]:"";
+
+ list <string> imageset_patterns = splitstring (pattern, ", ");
// no image-pattern defined, matches all patterns
- if (pattern == "" && result == $[]) {
+ if (size (imageset_patterns) == 0) {
possible_patterns[pattern] = image;
// image-patterns matches to patterns got as parameter
- } else if (contains (patterns, pattern)) {
- possible_patterns[pattern] = image;
- }
+ } else {
+ matching_patterns[pattern] = CountMatchingPatterns (imageset_patterns, patterns);
- matching_pattern_sizes[pattern] = size (image);
+ if (matching_patterns[pattern]:0 > 0) {
+ possible_patterns[pattern] = image;
+ }
+ }
});
- y2milestone ("Matching patterns: %1, sizes: %2", possible_patterns, matching_pattern_sizes);
+ y2milestone ("Matching patterns: %1, sizes: %2", possible_patterns, matching_patterns);
string last_pattern = "";
- // one result
- if (size (possible_patterns) == 1) {
- foreach (string pattern, map image, possible_patterns, {
- result = image;
- last_pattern = pattern;
- });
- // more possible results
- } else if (size (possible_patterns) > 1) {
- integer last_size = -1;
+ if (size (possible_patterns) > 0) {
+ integer last_number_of_matching_patterns = -1;
last_pattern = "";
foreach (string pattern, map image, possible_patterns, {
- if (matching_pattern_sizes[pattern]:0 > last_size && DoesPatternFitBetter (last_pattern, pattern)) {
- last_size = matching_pattern_sizes[pattern]:0;
+ if (matching_patterns[pattern]:0 > last_number_of_matching_patterns) {
+ last_number_of_matching_patterns = matching_patterns[pattern]:0;
result = image;
last_pattern = pattern;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-installation-2.16.28/VERSION new/yast2-installation-2.16.29/VERSION
--- old/yast2-installation-2.16.28/VERSION 2008-04-01 17:25:45.000000000 +0200
+++ new/yast2-installation-2.16.29/VERSION 2008-04-03 19:40:28.000000000 +0200
@@ -1 +1 @@
-2.16.28
+2.16.29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org