[yast-commit] r67133 - in /branches/SuSE-Code-11-SP2-Branch/update: VERSION package/yast2-update.changes src/modules/Update.ycp
![](https://seccdn.libravatar.org/avatar/60813f3f932f58dedcb16c313b400a2e.jpg?s=120&d=mm&r=g)
Author: jsuchome Date: Tue Jan 10 08:27:52 2012 New Revision: 67133 URL: http://svn.opensuse.org/viewcvs/yast?rev=67133&view=rev Log: - during update proposal, check if desktop is really installed (bnc#737402) - 2.17.23 Modified: branches/SuSE-Code-11-SP2-Branch/update/VERSION branches/SuSE-Code-11-SP2-Branch/update/package/yast2-update.changes branches/SuSE-Code-11-SP2-Branch/update/src/modules/Update.ycp Modified: branches/SuSE-Code-11-SP2-Branch/update/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/update/VERSION?rev=67133&r1=67132&r2=67133&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/update/VERSION (original) +++ branches/SuSE-Code-11-SP2-Branch/update/VERSION Tue Jan 10 08:27:52 2012 @@ -1 +1 @@ -2.17.22 +2.17.23 Modified: branches/SuSE-Code-11-SP2-Branch/update/package/yast2-update.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/update/package/yast2-update.changes?rev=67133&r1=67132&r2=67133&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/update/package/yast2-update.changes (original) +++ branches/SuSE-Code-11-SP2-Branch/update/package/yast2-update.changes Tue Jan 10 08:27:52 2012 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Jan 5 08:23:40 CET 2012 - jsuchome@suse.cz + +- during update proposal, check if desktop is really installed + (bnc#737402) +- 2.17.23 + +------------------------------------------------------------------- Fri Jul 1 15:13:01 CEST 2011 - locilka@suse.cz - better dialog label while searching for systems on disks Modified: branches/SuSE-Code-11-SP2-Branch/update/src/modules/Update.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/update/src/modules/Update.ycp?rev=67133&r1=67132&r2=67133&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/update/src/modules/Update.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/update/src/modules/Update.ycp Tue Jan 10 08:27:52 2012 @@ -639,10 +639,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