Mailinglist Archive: yast-commit (759 mails)
| < Previous | Next > |
[yast-commit] r45893 - in /trunk/installation: package/yast2-installation.changes src/clients/desktop_finish.ycp
- From: locilka@xxxxxxxxxxxxxxxx
- Date: Mon, 31 Mar 2008 14:45:52 -0000
- Message-id: <20080331144553.0494E2FB30@xxxxxxxxxxxxxxxx>
Author: locilka
Date: Mon Mar 31 16:45:52 2008
New Revision: 45893
URL: http://svn.opensuse.org/viewcvs/yast?rev=45893&view=rev
Log:
- There are currently two possible patterns/desktops that can use
kdm: kde4-kdm and kdebase3-kdm (bnc #372506).
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/desktop_finish.ycp
Modified: trunk/installation/package/yast2-installation.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=45893&r1=45892&r2=45893&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Mon Mar 31 16:45:52
2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Mar 31 16:42:40 CEST 2008 - locilka@xxxxxxx
+
+- There are currently two possible patterns/desktops that can use
+ kdm: kde4-kdm and kdebase3-kdm (bnc #372506).
+
+-------------------------------------------------------------------
Fri Mar 28 13:33:31 CET 2008 - locilka@xxxxxxx
- Automatic configuration has been moved from the end of the first
Modified: trunk/installation/src/clients/desktop_finish.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/desktop_finish.ycp?rev=45893&r1=45892&r2=45893&view=diff
==============================================================================
--- trunk/installation/src/clients/desktop_finish.ycp (original)
+++ trunk/installation/src/clients/desktop_finish.ycp Mon Mar 31 16:45:52 2008
@@ -53,32 +53,36 @@
// check who provides suse_help_viewer
// if kdebase3-SuSE isn't installed by apache or apache2, set
/etc/sysconfig/apache:DOC_SERVER
- if ((!(Pkg::IsProvided ("kdebase3-SuSE") || Pkg::IsSelected
("kdebase3-SuSE")))
+ if (
+ (!(Pkg::IsProvided ("kdebase3-SuSE") || Pkg::IsSelected
("kdebase3-SuSE")))
+ &&
+ (!(Pkg::IsProvided ("kdebase4-openSUSE") || Pkg::IsSelected
("kdebase4-openSUSE")))
&&
(Pkg::IsProvided ("apache2") || Pkg::IsSelected ("apache2")
|| Pkg::IsProvided ("apache") || Pkg::IsSelected ("apache")))
{
doc_server = true;
}
+
// this detects WM and DM according to selected patterns and
// installed packages
if ( !Mode::update () )
{
- map<string,map<string,string> > desktop_data = $[
+ map <string,map <string, any> > desktop_data = $[
"gnome" : $[
- "package" : "gdm",
+ "package" : ["gdm"],
"wm" : "gnome",
"dm" : "gdm",
"cursor" : "DMZ",
],
"kde" : $[
- "package" : "kde4-kdm",
+ "package" : ["kde4-kdm", "kdebase3-kdm"],
"wm" : "kde",
"dm" : "kdm",
"cursor" : "DMZ",
],
"twm" : $[
- "package" : "xorg-x11",
+ "package" : ["xorg-x11"],
"wm" : "",
"dm" : "xdm",
"cursor" : "DMZ",
@@ -90,22 +94,26 @@
string default_cursor = "DMZ";
string selected_desktop = DefaultDesktop::Desktop ();
- if (selected_desktop != "" && selected_desktop != nil)
- {
+
+ // DefaultDesktop has been set
+ if (selected_desktop != "" && selected_desktop != nil) {
y2milestone ("Desktop was set to %1", selected_desktop);
default_wm = desktop_data[selected_desktop, "wm"]:"";
default_dm = desktop_data[selected_desktop, "dm"]:"";
default_cursor = desktop_data[selected_desktop, "cursor"]:"";
- }
- else
- {
+
+ // KDE, GNOME CD ... or desktop just not set at all
+ } else {
list<map<string,any> > patterns
= Pkg::ResolvableDependencies ("", `pattern, "");
+
patterns = filter (map<string,any> p, patterns, {
return p["status"]:nil == `installed
|| p["status"]:nil == `selected;
});
+
list<list<string> > packages2 = [];
+
foreach (map<string,any> p, patterns, {
y2internal ("P: %1", p);
list<map<string,any> > deps = p["dependencies"]:[];
@@ -120,27 +128,27 @@
}));
y2internal ("Packages2: %1", packages2);
});
+
list<string> packages = (list<string>)toset (flatten (packages2));
y2debug ("All packages in selected patterns: %1", packages);
- list<string> desktop_order = ["gnome", "kde"];
+ list <string> desktop_order = ["gnome", "kde"];
boolean desktop_found = false;
string pattern_desktop = "gnome";
// check what packages are in the patterns
// and adjust logon and window manager according to it
- find (string d, desktop_order, {
- if (contains (packages, desktop_data[d, "package"]:""))
- {
- if (! desktop_found)
- {
+ foreach (string d, desktop_order, {
+ if (desktop_found) break;
+ foreach (string one_package, desktop_data[d, "package"]:[], {
+ if (desktop_found) break;
+ if (contains (packages, one_package)) {
desktop_found = true;
pattern_desktop = d;
y2milestone ("Setting desktop according to pattern to
%1", pattern_desktop);
}
- }
- return desktop_found;
+ });
});
// if no desktop was found according to pattern, try
@@ -149,35 +157,26 @@
desktop_order = add (desktop_order, "twm");
desktop_order = prepend (desktop_order, pattern_desktop);
desktop_found = false;
- find (string d, desktop_order, {
- string package = desktop_data[d, "package"]:"";
- if (Pkg::IsProvided (package)
- || Pkg::IsSelected (package))
- {
+
+ foreach (string d, desktop_order, {
+ if (desktop_found) break;
+
+ foreach (string package, desktop_data[d, "package"]:[], {
+ if (Pkg::IsProvided (package) && (Pkg::PkgInstalled
(package) || Pkg::IsSelected (package))) {
y2milestone ("package %1 selected or installed",
package);
- if (! desktop_found)
- {
- desktop_found = true;
- default_dm = desktop_data[d, "dm"]:"";
- y2milestone (
- "Setting logon manager %1 - package selecteed",
- default_dm);
- default_wm = desktop_data[d, "wm"]:"";
- y2milestone (
- "Setting window manager %1 - package selecteed",
- default_wm);
- default_cursor
- = desktop_data[d, "cursor"]:default_cursor;
- y2milestone (
- "Setting cursor theme %1 - package selected",
- default_cursor);
- }
- }
- else if (! desktop_found)
- {
- y2milestone ("Package %1 not selected or installed,
trying next desktop...", package);
+ desktop_found = true;
+ default_dm = desktop_data[d, "dm"]:"";
+ y2milestone ("Setting logon manager %1 - package
selecteed", default_dm);
+ default_wm = desktop_data[d, "wm"]:"";
+ y2milestone ("Setting window manager %1 - package
selecteed", default_wm);
+ default_cursor = desktop_data[d,
"cursor"]:default_cursor;
+ y2milestone ("Setting cursor theme %1 - package
selected", default_cursor);
}
- return desktop_found;
+
+ y2milestone ("Package %1 not selected or installed, trying
next desktop...", package);
+ });
+
+ return desktop_found;
});
}
y2milestone ("Default desktop: %1", default_wm);
@@ -206,6 +205,8 @@
SCR::Write (.sysconfig.displaymanager.DISPLAYMANAGER_SHUTDOWN,
dm_shutdown);
}
+
+ y2milestone ("sysconfig/displaymanager/DISPLAYMANAGER=%1", default_dm);
SCR::Write (.sysconfig.displaymanager.DISPLAYMANAGER, default_dm);
SCR::Write (.sysconfig.displaymanager, nil);
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
Date: Mon Mar 31 16:45:52 2008
New Revision: 45893
URL: http://svn.opensuse.org/viewcvs/yast?rev=45893&view=rev
Log:
- There are currently two possible patterns/desktops that can use
kdm: kde4-kdm and kdebase3-kdm (bnc #372506).
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/desktop_finish.ycp
Modified: trunk/installation/package/yast2-installation.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=45893&r1=45892&r2=45893&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Mon Mar 31 16:45:52
2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Mar 31 16:42:40 CEST 2008 - locilka@xxxxxxx
+
+- There are currently two possible patterns/desktops that can use
+ kdm: kde4-kdm and kdebase3-kdm (bnc #372506).
+
+-------------------------------------------------------------------
Fri Mar 28 13:33:31 CET 2008 - locilka@xxxxxxx
- Automatic configuration has been moved from the end of the first
Modified: trunk/installation/src/clients/desktop_finish.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/desktop_finish.ycp?rev=45893&r1=45892&r2=45893&view=diff
==============================================================================
--- trunk/installation/src/clients/desktop_finish.ycp (original)
+++ trunk/installation/src/clients/desktop_finish.ycp Mon Mar 31 16:45:52 2008
@@ -53,32 +53,36 @@
// check who provides suse_help_viewer
// if kdebase3-SuSE isn't installed by apache or apache2, set
/etc/sysconfig/apache:DOC_SERVER
- if ((!(Pkg::IsProvided ("kdebase3-SuSE") || Pkg::IsSelected
("kdebase3-SuSE")))
+ if (
+ (!(Pkg::IsProvided ("kdebase3-SuSE") || Pkg::IsSelected
("kdebase3-SuSE")))
+ &&
+ (!(Pkg::IsProvided ("kdebase4-openSUSE") || Pkg::IsSelected
("kdebase4-openSUSE")))
&&
(Pkg::IsProvided ("apache2") || Pkg::IsSelected ("apache2")
|| Pkg::IsProvided ("apache") || Pkg::IsSelected ("apache")))
{
doc_server = true;
}
+
// this detects WM and DM according to selected patterns and
// installed packages
if ( !Mode::update () )
{
- map<string,map<string,string> > desktop_data = $[
+ map <string,map <string, any> > desktop_data = $[
"gnome" : $[
- "package" : "gdm",
+ "package" : ["gdm"],
"wm" : "gnome",
"dm" : "gdm",
"cursor" : "DMZ",
],
"kde" : $[
- "package" : "kde4-kdm",
+ "package" : ["kde4-kdm", "kdebase3-kdm"],
"wm" : "kde",
"dm" : "kdm",
"cursor" : "DMZ",
],
"twm" : $[
- "package" : "xorg-x11",
+ "package" : ["xorg-x11"],
"wm" : "",
"dm" : "xdm",
"cursor" : "DMZ",
@@ -90,22 +94,26 @@
string default_cursor = "DMZ";
string selected_desktop = DefaultDesktop::Desktop ();
- if (selected_desktop != "" && selected_desktop != nil)
- {
+
+ // DefaultDesktop has been set
+ if (selected_desktop != "" && selected_desktop != nil) {
y2milestone ("Desktop was set to %1", selected_desktop);
default_wm = desktop_data[selected_desktop, "wm"]:"";
default_dm = desktop_data[selected_desktop, "dm"]:"";
default_cursor = desktop_data[selected_desktop, "cursor"]:"";
- }
- else
- {
+
+ // KDE, GNOME CD ... or desktop just not set at all
+ } else {
list<map<string,any> > patterns
= Pkg::ResolvableDependencies ("", `pattern, "");
+
patterns = filter (map<string,any> p, patterns, {
return p["status"]:nil == `installed
|| p["status"]:nil == `selected;
});
+
list<list<string> > packages2 = [];
+
foreach (map<string,any> p, patterns, {
y2internal ("P: %1", p);
list<map<string,any> > deps = p["dependencies"]:[];
@@ -120,27 +128,27 @@
}));
y2internal ("Packages2: %1", packages2);
});
+
list<string> packages = (list<string>)toset (flatten (packages2));
y2debug ("All packages in selected patterns: %1", packages);
- list<string> desktop_order = ["gnome", "kde"];
+ list <string> desktop_order = ["gnome", "kde"];
boolean desktop_found = false;
string pattern_desktop = "gnome";
// check what packages are in the patterns
// and adjust logon and window manager according to it
- find (string d, desktop_order, {
- if (contains (packages, desktop_data[d, "package"]:""))
- {
- if (! desktop_found)
- {
+ foreach (string d, desktop_order, {
+ if (desktop_found) break;
+ foreach (string one_package, desktop_data[d, "package"]:[], {
+ if (desktop_found) break;
+ if (contains (packages, one_package)) {
desktop_found = true;
pattern_desktop = d;
y2milestone ("Setting desktop according to pattern to
%1", pattern_desktop);
}
- }
- return desktop_found;
+ });
});
// if no desktop was found according to pattern, try
@@ -149,35 +157,26 @@
desktop_order = add (desktop_order, "twm");
desktop_order = prepend (desktop_order, pattern_desktop);
desktop_found = false;
- find (string d, desktop_order, {
- string package = desktop_data[d, "package"]:"";
- if (Pkg::IsProvided (package)
- || Pkg::IsSelected (package))
- {
+
+ foreach (string d, desktop_order, {
+ if (desktop_found) break;
+
+ foreach (string package, desktop_data[d, "package"]:[], {
+ if (Pkg::IsProvided (package) && (Pkg::PkgInstalled
(package) || Pkg::IsSelected (package))) {
y2milestone ("package %1 selected or installed",
package);
- if (! desktop_found)
- {
- desktop_found = true;
- default_dm = desktop_data[d, "dm"]:"";
- y2milestone (
- "Setting logon manager %1 - package selecteed",
- default_dm);
- default_wm = desktop_data[d, "wm"]:"";
- y2milestone (
- "Setting window manager %1 - package selecteed",
- default_wm);
- default_cursor
- = desktop_data[d, "cursor"]:default_cursor;
- y2milestone (
- "Setting cursor theme %1 - package selected",
- default_cursor);
- }
- }
- else if (! desktop_found)
- {
- y2milestone ("Package %1 not selected or installed,
trying next desktop...", package);
+ desktop_found = true;
+ default_dm = desktop_data[d, "dm"]:"";
+ y2milestone ("Setting logon manager %1 - package
selecteed", default_dm);
+ default_wm = desktop_data[d, "wm"]:"";
+ y2milestone ("Setting window manager %1 - package
selecteed", default_wm);
+ default_cursor = desktop_data[d,
"cursor"]:default_cursor;
+ y2milestone ("Setting cursor theme %1 - package
selected", default_cursor);
}
- return desktop_found;
+
+ y2milestone ("Package %1 not selected or installed, trying
next desktop...", package);
+ });
+
+ return desktop_found;
});
}
y2milestone ("Default desktop: %1", default_wm);
@@ -206,6 +205,8 @@
SCR::Write (.sysconfig.displaymanager.DISPLAYMANAGER_SHUTDOWN,
dm_shutdown);
}
+
+ y2milestone ("sysconfig/displaymanager/DISPLAYMANAGER=%1", default_dm);
SCR::Write (.sysconfig.displaymanager.DISPLAYMANAGER, default_dm);
SCR::Write (.sysconfig.displaymanager, nil);
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
| < Previous | Next > |