On Tue, 10 Jan 2012 07:27:53 -0000
[email protected] wrote:

> Author: jsuchome
> Date: Tue Jan 10 08:27:52 2012
> New Revision: 67133
> <snip>
> --- 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();
^^^
wrong indentation
> +     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);
>       }
> 



-- 
Josef Reidinger
Software Engineer Appliance Department

SUSE LINUX, s. r. o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic

[email protected]
SUSE
-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to