Commits

Ulrich Hansen committed 63ca1e2 Merge

Merge

Comments (0)

Files changed (4)

debian/desktop-theme-growing.lintian-overrides

+# Since we ship an alternative to the real file in order to make it configurable,
+# ignore the diversion-for-unknown-file. This should be fixed when ksplash theme
+# became more configurable
+desktop-theme-growing: diversion-for-unknown-file usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc preinst:19
 set -e
 
 clear_wallpaper_cache() {
-# Clear wallpaper cache for all users.
-rm -f /home/*/.cache/wallpaper/*
+    # Clear wallpaper cache for all users.
+    rm -f /home/*/.cache/wallpaper/*
 }
 
 
 # Count the previously installed desktop-theme-packages in /usr/share
 # and add their number to the priority. So the last installed package
 # always gets the highest priority.
-
 base_priority=90
-desktop_theme_packages=$(/usr/bin/find /usr/share/desktop-theme-* -prune | /usr/bin/wc -l)
+desktop_theme_packages=$(find /usr/share/desktop-theme-* -prune | wc -l)
 priority=$((base_priority+$desktop_theme_packages))
 
 install_alternatives() {
 }
 
 update_plymouth_config() {
-    if which plymouth-set-default-theme ; then
+    if which plymouth-set-default-theme > /dev/null ; then
         plymouth-set-default-theme growing || true
     fi
 }
     fi
 }
 
+update_kdm_config() {
+    # Calling start first, then reload to force a call to /etc/init.d/kdm
+    # function setup_config, only called when starting.
+    if [ -x /usr/bin/kdm ]; then
+        invoke-rc.d kdm start || true
+        invoke-rc.d kdm reload || true
+    fi
+}
+
 case "$1" in
     configure|abort-upgrade)
+        # TODO: review removal of user data within install script.
         clear_wallpaper_cache
         install_alternatives
         set_alternatives_auto
         push_kde_backgrounds_to_users
         install_logfile
         update_grub_config
+        # TODO: review configuring only the user's choice from default DM
         update_gdm3_config
+        update_kdm_config
         update_plymouth_config
     ;;
 
         if [ -x /usr/sbin/gdm3 ]; then
             invoke-rc.d gdm3 reload || true
         fi
+        
+        # Reload KDM so it wont complain about missing themes
+        if [ -x /usr/bin/kdm ]; then
+            invoke-rc.d kdm start || true
+            invoce-rc.d kdm reload || true
+        fi
 
-# Remove diversion - but only if there isn't any other theme package that needs it:
 
-/usr/bin/test -f /usr/share/desktop-base/profiles/kde-profile/share/config/.ksplashrc.*.id \
-                    || dpkg-divert --package desktop-theme-growing --remove --rename \
-                    --divert /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc.real \
-                    /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc
+        # Remove diversion - but only if there isn't any other theme package that needs it:
 
-# Remove the small id that signaled the existence of another theme package to this one:
+        test -f /usr/share/desktop-base/profiles/kde-profile/share/config/.ksplashrc.*.id \
+            || dpkg-divert --package desktop-theme-growing --remove --rename \
+            --divert /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc.real \
+            /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc
+
+        # Remove the small id that signaled the existence of another theme package to this one:
         find /usr/share/desktop-base/profiles/kde-profile/share/config/ -name ".ksplashrc.growing.id" -delete
 
-# Remove Gnome wallpaper launcher:
+        # Remove Gnome wallpaper launcher:
         rm -f /etc/xdg/autostart/growing-autostart.desktop
-# and the small id file in the users home folder
+        # and the small id file in the users home folder
         find /home -name "desktop-theme-growing.id" -delete
 
-# Remove the KDE backgrounds to default (Joy) if we are the last theme-package
+        # Remove the KDE backgrounds to default (Joy) if we are the last theme-package
         if [ -f /home/*/.kde/share/config/plasma-desktop-appletsrc ]; then
         /usr/bin/test -d /usr/share/desktop-theme-* || \
         /bin/sed -i 's/wallpaper=desktop-theme-package/wallpaper=joy/' /home/*/.kde/share/config/plasma-desktop-appletsrc
 
 # If there is already another theme package (and another ksplashrc diversion)
 # installed, install a small marker file for postrm.
-
-/usr/bin/test -f /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc.real \
- && /bin/touch /usr/share/desktop-base/profiles/kde-profile/share/config/.ksplashrc.growing.id;
+test -f /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc.real \
+    && touch /usr/share/desktop-base/profiles/kde-profile/share/config/.ksplashrc.growing.id;
 
 # desktop-base configures ksplashrc directly to point to it's background svg.
 # So we need a diversion of ksplashrc. But only if there isn't another theme
 # package present that already did that.
-
-/usr/bin/test -f /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc.real \
- || dpkg-divert --package desktop-theme-growing --add --rename \
---divert /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc.real \
-/usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc; 
+test -f /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc.real \
+    || dpkg-divert --package desktop-theme-growing --add --rename \
+    --divert /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc.real \
+    /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc; 
 
 
 #DEBHELPER#