diff options
author | Aurélien COUDERC <zecoucou@free.fr> | 2017-01-30 21:26:17 +0000 |
---|---|---|
committer | Aurélien COUDERC <zecoucou@free.fr> | 2017-01-30 21:26:17 +0000 |
commit | c887198a53d938a07d06268990fc3ef162b4ab74 (patch) | |
tree | 02fa087e0e12b10410db20a93c35af8ba6f9d2f7 /debian | |
parent | b2a3f723ca77079b45cf6371fb0160927e4d61b6 (diff) |
Fix minor problems with maintainer scripts (Closes: #853224)
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/preinst | 104 | ||||
-rw-r--r-- | debian/prerm | 23 |
3 files changed, 61 insertions, 73 deletions
diff --git a/debian/changelog b/debian/changelog index e0fb049..8a2d31c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +desktop-base (9.0.3) UNRELEASED; urgency=medium + + * Fix minor problems with maintainer scripts, thanks Raphaël Hertzog for the + detailed review. (Closes: #853224) + + -- Aurélien COUDERC <zecoucou@free.fr> Mon, 30 Jan 2017 22:21:40 +0100 + desktop-base (9.0.2) unstable; urgency=medium [ Aurélien COUDERC ] diff --git a/debian/preinst b/debian/preinst index e7d4e2d..9fa1e6b 100644 --- a/debian/preinst +++ b/debian/preinst @@ -6,6 +6,39 @@ set -e if [ "${1}" = "upgrade" ]; then if dpkg --compare-versions ${2} le "9.0.0~exp1"; then + # Remove alternative for desktop splash we don’t ship anymore + update-alternatives --remove-all desktop-splash + + # Remove alternatives for themes we now ship elsewhere as a theme pack + ## Wallpaper + for background in \ + lines-wallpaper_1280x1024.svg \ + lines-wallpaper_1600x1200.svg \ + lines-wallpaper_1920x1200.svg \ + lines-wallpaper_2560x1080.svg \ + lines-wallpaper_1920x1080.svg \ + ; do + update-alternatives --remove desktop-background /usr/share/images/desktop-base/$background + done + update-alternatives --remove \ + desktop-background.xml \ + /usr/share/images/desktop-base/lines.xml + ## Login background + update-alternatives --remove desktop-login-background \ + /usr/share/desktop-base/lines-theme/login-background.svg + update-alternatives --remove desktop-login-background \ + /usr/share/desktop-base/lines-theme/login-background-with-logo.svg + + ## Grub background + while read background; do + update-alternatives --remove \ + desktop-grub \ + /usr/share/images/desktop-base/$background + done << EOF +lines-grub.png +lines-grub-1920x1080.png +EOF + # Remove alternatives for moreblue wallpapers we don’t ship anymore while read background; do update-alternatives --remove \ @@ -50,69 +83,32 @@ joy-grub.png spacefun-grub.png spacefun-grub-widescreen.png EOF - if dpkg --compare-versions ${2} ge "9.0.0~exp1"; then - echo "ge 9.0.0~exp1" - # Remove alternatives shipped in 9.0.0~exp1 but now integrated - # into the theme pack system. - # Joy old theme structure + fi + + if dpkg --compare-versions ${2} eq "9.0.0~exp1"; then + # Remove alternatives shipped in 9.0.0~exp1 but now integrated + # into the theme pack system. + # Joy old theme structure + update-alternatives --remove \ + desktop-login-background \ + /usr/share/desktop-base/joy-theme/login-background.svg + # Remove login theme alternatives for theme packages + # because we’re dropping the secondary link for SDDM preview + while read theme background; do update-alternatives --remove \ desktop-login-background \ - /usr/share/desktop-base/joy-theme/login-background.svg - # Remove login theme alternatives for theme packages - # because we’re dropping the secondary link for SDDM preview - while read theme background; do - update-alternatives --remove \ - desktop-login-background \ - /usr/share/desktop-base/$theme-theme/login/$background - done << EOF + /usr/share/desktop-base/$theme-theme/login/$background + done << EOF softwaves background.svg lines background.svg lines background-nologo.svg joy background.svg spacefun background.svg EOF - # *Last* remove *highest priority* alternative for active theme - update-alternatives --remove \ - desktop-login-background \ - /usr/share/desktop-base/active-theme/login/background.svg - fi - - fi - - if dpkg --compare-versions ${2} lt "9.0.0~"; then - # Remove alternative for desktop splash we don’t ship anymore - update-alternatives --remove-all desktop-splash - - # Remove alternatives for themes we now ship elsewhere as a theme pack - ## Wallpaper - for background in \ - lines-wallpaper_1280x1024.svg \ - lines-wallpaper_1600x1200.svg \ - lines-wallpaper_1920x1200.svg \ - lines-wallpaper_2560x1080.svg \ - lines-wallpaper_1920x1080.svg \ - ; do - update-alternatives --remove desktop-background /usr/share/images/desktop-base/$background - done + # *Last* remove *highest priority* alternative for active theme update-alternatives --remove \ - desktop-background.xml \ - /usr/share/images/desktop-base/lines.xml - ## Login background - update-alternatives --remove desktop-login-background \ - /usr/share/desktop-base/lines-theme/login-background.svg - update-alternatives --remove desktop-login-background \ - /usr/share/desktop-base/lines-theme/login-background-with-logo.svg - - ## Grub background - while read background; do - update-alternatives --remove \ - desktop-grub \ - /usr/share/images/desktop-base/$background - done << EOF -lines-grub.png -lines-grub-1920x1080.png -EOF + desktop-login-background \ + /usr/share/desktop-base/active-theme/login/background.svg fi - fi diff --git a/debian/prerm b/debian/prerm index 4f40120..321c38c 100644 --- a/debian/prerm +++ b/debian/prerm @@ -9,7 +9,7 @@ if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then while read theme filename; do update-alternatives --remove \ desktop-background \ - /usr/share/desktop-base/$theme-theme/wallpaper/contents/images/$filename $priority + /usr/share/desktop-base/$theme-theme/wallpaper/contents/images/$filename done << EOF softwaves 1024x768.svg softwaves 1280x720.svg @@ -48,7 +48,7 @@ EOF while read theme; do update-alternatives --remove \ desktop-background.xml \ - /usr/share/desktop-base/$theme-theme/wallpaper/gnome-background.xml $priority + /usr/share/desktop-base/$theme-theme/wallpaper/gnome-background.xml done << EOF softwaves lines @@ -66,7 +66,7 @@ EOF while read theme; do update-alternatives --remove \ desktop-lockscreen.xml \ - /usr/share/desktop-base/$theme-theme/lockscreen/gnome-background.xml $priority + /usr/share/desktop-base/$theme-theme/lockscreen/gnome-background.xml done << EOF softwaves lines @@ -115,24 +115,9 @@ EOF desktop-login-background \ /usr/share/desktop-base/active-theme/login/background.svg - # Remove GRUB alternatives - # Remove alternative for the GRUB background/colors config - while read theme priority; do - update-alternatives --remove \ - desktop-grub.sh \ - /usr/share/desktop-base/$theme-theme/grub/grub_background.sh - done << EOF -softwaves -lines -joy -spacefun -EOF - # Remove background alternatives + # Remove GRUB background alternatives while read theme ratio; do update-alternatives --remove \ - desktop-grub.sh \ - /usr/share/desktop-base/$theme-theme/grub/grub_background.sh - update-alternatives --remove \ desktop-grub \ /usr/share/desktop-base/$theme-theme/grub/grub-$ratio.png done << EOF |