diff --git a/gnome b/gnome index 404b1a8..ba62653 100644 --- a/gnome +++ b/gnome @@ -8,58 +8,20 @@ # https://bugzilla.novell.com/ # -# openSUSE <= 10.3 and SLED <= 10 modified the user GConf database to change background. -# New openSUSE obsoletes this mechanism by branding and gnome-wp-list. -# We still have to detect old modifications in the user database and remove them. -# -# This code may disappear after SLED 12: -OLD_WALLPAPER=$(gconftool-2 --get /desktop/gnome/background/picture_filename 2>/dev/null) -PICTURE_OPTIONS=$(gconftool-2 --get /desktop/gnome/background/picture_options 2>/dev/null) -if [ "$PICTURE_OPTIONS" != "none" -a \(\ - "$OLD_WALLPAPER" != "${OLD_WALLPAPER#/usr/share/wallpapers/default}" -o ! -e "$OLD_WALLPAPER" \) ] ; then - gconftool-2 -u /desktop/gnome/background/picture_filename - gconftool-2 -u /desktop/gnome/background/picture_options -fi - -function use_sled10_default { - # do this only for SLED * - ([ -e /etc/SuSE-release ] && grep "SUSE Linux Enterprise Desktop" /etc/SuSE-release) || return - - # do this only one time - [ -e $HOME/.skel/sled10-run ] && return - - # dump the existing config for backup - PANEL_BACKUP=panel-settings-backup-`date '+%m%d%y%H%M%S'`.xml - gconftool-2 --dump /apps/panel > $PANEL_BACKUP - - # unset the current panel configuration - gconftool-2 --recursive-unset /apps/panel/default_setup - gconftool-2 --unset /apps/panel/general/toplevel_id_list - gconftool-2 --unset /apps/panel/general/applet_id_list - gconftool-2 --unset /apps/panel/general/object_id_list - gconftool-2 --recursive-unset /apps/panel/profiles/default - gconftool-2 --recursive-unset /apps/panel/toplevels - gconftool-2 --unset /apps/metacity/general/num_workspaces - - # we are done, set the flag - touch ~/.skel/sled10-run -} - -# start up the gnome2 session - -# reset the SLED 10 UI only if upgrading from NLD9/SLES9, anything newer we -# ignore (like SL 9.3), the logic here is redundant but its low risk -# Remove this code after SLED11: -mkdir -p $HOME/.skel -TRY_SLED10=1 -if [ ! -e $HOME/.skel/gnome2-run ] || [ -e $HOME/.skel/gnome2-run-9.2 ] ; then - TRY_SLED10=0 -fi - -if [ $TRY_SLED10 -gt 0 ] ; then - use_sled10_default -else - touch ~/.skel/sled10-run +# For checks that are SLE-only. +if test "x`head -n 1 /etc/SuSE-brand 2> /dev/null`" != "xopenSUSE"; then + # openSUSE <= 10.3 and SLED <= 10 modified the user GConf database to change background. + # New openSUSE obsoletes this mechanism by branding and gnome-wp-list. + # We still have to detect old modifications in the user database and remove them. + # + # This code may disappear after SLED 12: + OLD_WALLPAPER=$(gconftool-2 --get /desktop/gnome/background/picture_filename 2>/dev/null) + PICTURE_OPTIONS=$(gconftool-2 --get /desktop/gnome/background/picture_options 2>/dev/null) + if [ "$PICTURE_OPTIONS" != "none" -a \(\ + "$OLD_WALLPAPER" != "${OLD_WALLPAPER#/usr/share/wallpapers/default}" -o ! -e "$OLD_WALLPAPER" \) ] ; then + gconftool-2 -u /desktop/gnome/background/picture_filename + gconftool-2 -u /desktop/gnome/background/picture_options + fi fi # Some actions that are specific to the LiveCD diff --git a/gnome-session.changes b/gnome-session.changes index 964cb31..0402b2c 100644 --- a/gnome-session.changes +++ b/gnome-session.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Feb 12 14:38:28 CET 2010 - vuntz@opensuse.org + +- Update gnome script: + + Remove migration code of panel configuration. It was only + needed up to SLED11. SLED11 has been released, and we're + openSUSE, so it's safe to remove it. + + Make the code fixing the background configuration run only for + non-openSUSE branded distributions. We don't want it in + openSUSE since it runs gconftool-2, and might slow down login a + bit. + ------------------------------------------------------------------- Wed Jan 27 17:16:25 CET 2010 - vuntz@opensuse.org diff --git a/gnome-session.spec b/gnome-session.spec index 18aa813..d37f8eb 100644 --- a/gnome-session.spec +++ b/gnome-session.spec @@ -19,7 +19,7 @@ Name: gnome-session Version: 2.29.6 -Release: 1 +Release: 2 License: GPLv2+ Summary: Session Tools for the GNOME 2.x Desktop Url: http://www.gnome.org