[yast-commit] r67134 - in /trunk/update: VERSION package/yast2-update.changes src/modules/Update.ycp
Author: jsuchome Date: Tue Jan 10 08:28:08 2012 New Revision: 67134 URL: http://svn.opensuse.org/viewcvs/yast?rev=67134&view=rev Log: - during update proposal, check if desktop is really installed (bnc#737402) - 2.22.1 Modified: trunk/update/VERSION trunk/update/package/yast2-update.changes trunk/update/src/modules/Update.ycp Modified: trunk/update/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/update/VERSION?rev=67134&r1=67133&r2=67134&view=diff ============================================================================== --- trunk/update/VERSION (original) +++ trunk/update/VERSION Tue Jan 10 08:28:08 2012 @@ -1 +1 @@ -2.22.0 +2.22.1 Modified: trunk/update/package/yast2-update.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/update/package/yast2-update.changes?rev=67134&r1=67133&r2=67134&view=diff ============================================================================== --- trunk/update/package/yast2-update.changes (original) +++ trunk/update/package/yast2-update.changes Tue Jan 10 08:28:08 2012 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Jan 10 08:27:01 CET 2012 - jsuchome@suse.cz + +- during update proposal, check if desktop is really installed + (bnc#737402) +- 2.22.1 + +------------------------------------------------------------------- Wed Nov 16 11:22:38 CET 2011 - jsuchome@suse.cz - merged texts from proofreading Modified: trunk/update/src/modules/Update.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/update/src/modules/Update.ycp?rev=67134&r1=67133&r2=67134&view=diff ============================================================================== --- trunk/update/src/modules/Update.ycp (original) +++ trunk/update/src/modules/Update.ycp Tue Jan 10 08:28:08 2012 @@ -624,10 +624,41 @@ return ret; } + // check if given package is installed in the system selected for update + // (currently mounted under /mnt) + boolean PackageInstalled (string package) + { + return SCR::Execute (.target.bash, sformat ("rpm -q %1 --root /mnt", package)) == 0; + } + global void SetDesktopPattern() { - string desktop = ReadInstalledDesktop(); - if (desktop == "kde" || desktop == "gnome") + + string desktop = ReadInstalledDesktop(); + if (contains (["kde", "kde4", "xfce", "lxde", "gnome", "startkde", "startkde4"], desktop)) { + // 'gnome'/'startkde' could be default values even if not installed, + // check the real state (bnc#737402) + if (desktop == "gnome") + { + if (!PackageInstalled ("gnome-session")) + { + y2milestone ("GNOME not present: not installing new desktop"); + return; + } + } + else if (desktop == "startkde" || desktop == "startkde4") + { + if (PackageInstalled ("kdebase3-session") || PackageInstalled ("kdebase4-session")) + { + desktop = "kde4"; + } + else + { + y2milestone ("KDE not present: not installing new desktop"); + return; + } + } + y2milestone ("Selecting pattern to install: %1", desktop); Pkg::ResolvableInstall (desktop, `pattern); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsuchome@svn2.opensuse.org