![](https://seccdn.libravatar.org/avatar/2e1a2d7374f0eeb790839676bdd1123a.jpg?s=120&d=mm&r=g)
Author: locilka
Date: Thu Apr 3 19:40:19 2008
New Revision: 46058
URL: http://svn.opensuse.org/viewcvs/yast?rev=46058&view=rev
Log:
- Changed instalation from images to count the best image-set
from patterns (list of patterns in image-set) in images.xml.
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/inst_doit.ycp
trunk/installation/src/modules/ImageInstallation.ycp
Modified: trunk/installation/package/yast2-installation.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=46058&r1=46057&r2=46058&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Thu Apr 3 19:40:19 2008
@@ -8,6 +8,8 @@
- 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.
-------------------------------------------------------------------
Tue Apr 1 13:12:00 CEST 2008 - locilka@suse.cz
Modified: trunk/installation/src/clients/inst_doit.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_doit.ycp?rev=46058&r1=46057&r2=46058&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_doit.ycp (original)
+++ trunk/installation/src/clients/inst_doit.ycp Thu Apr 3 19:40:19 2008
@@ -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;
}
Modified: trunk/installation/src/modules/ImageInstallation.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/modules/ImageInstallation.ycp?rev=46058&r1=46057&r2=46058&view=diff
==============================================================================
--- trunk/installation/src/modules/ImageInstallation.ycp (original)
+++ trunk/installation/src/modules/ImageInstallation.ycp Thu Apr 3 19:40:19 2008
@@ -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