Commits

Ronoaldo Pereira committed 2f9d3d5

Preparing changelog for upload to experimental; Updated {post,pre}{inst,rm}
scripts to comply with debian-policy.

Comments (0)

Files changed (5)

-desktop-theme-growing (1.0.0) experimental; urgency=low
+desktop-theme-growing (1.0.0~exp1) experimental; urgency=low
 
-  * Initial Release.
+  [Ronoaldo JLP]
+  * Initial Release
+  
+  [Ulrich Hansen]
+  * Added full artowrk from Growing theme proposal, thanks to
+    (Franz Gratzer)
 
  -- Ronoaldo JLP <ronoaldo@gmail.com>  Tue, 26 Jun 2012 23:32:35 -0300
 
 set -e
 
-clear_wallpaper_cache() {
-    # 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.
     update-alternatives --auto desktop-login
 }
 
-push_kde_backgrounds_to_users() {
-    if [ -f /home/*/.kde/share/config/plasma-desktop-appletsrc ]; then
-    /bin/sed -i 's/wallpaper=.*/wallpaper=desktop-theme-package/' /home/*/.kde/share/config/plasma-desktop-appletsrc
-    fi
-    if [ -f /home/*/.kde/share/config/startupconfig ]; then
-    /bin/sed -i 's/ksplashrc_ksplash_theme=.*/ksplashrc_ksplash_theme=desktop-theme-package/' /home/*/.kde/share/config/startupconfig
-    fi
-    if [ -f /home/*/.kde/share/config/ksplashrc ]; then
-    /bin/sed -i 's/Engine=.*/Engine=KSplashX/' /home/*/.kde/share/config/ksplashrc
-    /bin/sed -i 's/Theme=.*/Theme=desktop-theme-package/' /home/*/.kde/share/config/ksplashrc
-    fi
-    if [ -f /etc/kde4/kdm/kdmrc ]; then
-    /bin/sed -i '/UseTheme/!s/Theme=.*/Theme=\/usr\/share\/kde4\/apps\/kdm\/themes\/desktop-theme-package/' /etc/kde4/kdm/kdmrc
-    fi
-}
-
-
 install_logfile() {
-# To keep track of installed plymouth themes, we use a logfile in /var.
-    /usr/bin/test -f /var/log/desktop-theme-packages.log || /bin/touch /var/log/desktop-theme-packages.log
-    echo "growing" >>/var/log/desktop-theme-packages.log
+    # To keep track of installed plymouth themes, we use a logfile in /var.
+    test -f /var/log/desktop-theme-packages.log || touch /var/log/desktop-theme-packages.log
+    echo "growing" >> /var/log/desktop-theme-packages.log
 }
 
 update_plymouth_config() {
     # Calling start first, then reload to force a call to /etc/init.d/kdm
     # function setup_config, only called when starting.
     if [ -f /run/kdm.pid ]; then
-#        invoke-rc.d kdm restart || 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
 
 set -e
 
+# Restores the Plymouth theme to the previous one
+restore_plymouth_theme() {
+    sed -i  '/growing/d' /var/log/desktop-theme-packages.log
+    # Get previous theme
+    test -d /usr/share/desktop-theme-* && theme=$(tail -1 /var/log/desktop-theme-packages.log)
+    # If there is no more desktop-theme package installed, remove the logfile
+    test -d /usr/share/desktop-theme-* || rm -f /var/log/desktop-theme-packages.log
+    # Set plymouth to previous theme
+    if which plymouth-set-default-theme > /dev/null ; then
+        test -d /usr/share/desktop-theme-* && plymouth-set-default-theme $theme
+        test -d /usr/share/desktop-theme-* || plymouth-set-default-theme joy
+        test -d /usr/share/images/desktop-base || plymouth-set-default-theme -r 
+    fi
+}
+
 case "$1" in
     remove|deconfigure)
         if which update-grub2 > /dev/null ; then
             update-grub2 || true
         fi
 
-        # Some lines to let plymouth use the previous theme.
-        # Remove current theme from logfile.
-        sed -i  '/growing/d' /var/log/desktop-theme-packages.log
-        # Get previous theme
-        /usr/bin/test -d /usr/share/desktop-theme-* && theme=$(tail -1 /var/log/desktop-theme-packages.log)
-        # If there is no more desktop-theme package installed, remove the logfile
-        /usr/bin/test -d /usr/share/desktop-theme-* || rm -f /var/log/desktop-theme-packages.log
-        # Set plymouth to previous theme
-        /usr/bin/test -d /usr/share/desktop-theme-* && plymouth-set-default-theme $theme
-        /usr/bin/test -d /usr/share/desktop-theme-* || plymouth-set-default-theme joy
-        /usr/bin/test -d /usr/share/images/desktop-base || plymouth-set-default-theme -r 
-
+        restore_plymouth_theme
 
         if [ -x /usr/sbin/update-initramfs ]; then
            update-initramfs -u || true
         fi
+
         # Reset gdm3 wallpaper cache
         rm -f /var/lib/gdm3/.cache/wallpaper/*
         if [ -x /usr/sbin/gdm3 ]; then
         
         # Reload KDM so it wont complain about missing themes
         if [ -f /run/kdm.pid ]; then
-#            invoke-rc.d kdm restart || true
             invoke-rc.d kdm reload || true
         fi
 
-
         # Remove diversion - but only if there isn't any other theme package that needs it:
-
         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 \
 
         # Remove Gnome wallpaper launcher:
         rm -f /etc/xdg/autostart/growing-autostart.desktop
-        # 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
-        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
-        fi
-
-        if [ -f /home/*/.kde/share/config/startupconfig ]; then
-        /usr/bin/test -d /usr/share/desktop-theme-* || \
-        /bin/sed -i 's/ksplashrc_ksplash_theme=desktop-theme-package/ksplashrc_ksplash_theme=joy/' /home/*/.kde/share/config/startupconfig
-        fi
-
-        if [ -f /home/*/.kde/share/config/ksplashrc ]; then
-        /usr/bin/test -d /usr/share/desktop-theme-* || \
-        /bin/sed -i 's/Theme=desktop-theme-package/Theme=joy/' /home/*/.kde/share/config/ksplashrc
-        fi
-
-        if [ -f /etc/kde4/kdm/kdmrc ]; then
-        /usr/bin/test -d /usr/share/desktop-theme-* || \
-        /bin/sed -i 's/Theme=\/usr\/share\/kde4\/apps\/kdm\/themes\/desktop-theme-package/Theme=\/usr\/share\/kde4\/apps\/kdm\/themes\/joy/' /etc/kde4/kdm/kdmrc
-        fi
-    ;;
     purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
     ;;
 
 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; 
-
+    /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc;
 
 #DEBHELPER#
 
 
 set -e
 
-clear_wallpaper_cache() {
-# Clear wallpaper cache for all users.
-rm -f /home/*/.cache/wallpaper/*
-}
-
-
 uninstall_alternatives() {
     update-alternatives --remove \
         desktop-background \
         /usr/share/desktop-theme-growing/backgrounds/growing-login.png
 }
 
-
 case "$1" in
     remove|upgrade|deconfigure)
-        clear_wallpaper_cache
         uninstall_alternatives
     ;;
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.