Fix minor problems with maintainer scripts (Closes: #853224)

This commit is contained in:
Aurélien COUDERC
2017-01-30 21:26:17 +00:00
parent b2a3f723ca
commit c887198a53
3 changed files with 61 additions and 73 deletions
+7
View File
@@ -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 ]
+50 -54
View File
@@ -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 dont 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 dont 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 were 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 were 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 dont 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
+4 -19
View File
@@ -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,23 +115,8 @@ 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