[debian-edu-commits] debian-edu/ 01/01: Fix update-d-e-a-(lines|softwaves|spacefun) (Closes: #766088, #789084).
Wolfgang Schweer
schweer-guest at moszumanska.debian.org
Sun Nov 13 16:30:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
schweer-guest pushed a commit to branch master
in repository debian-edu-artwork.
commit b472b68baffc9c447ee62fa3733b3cc653e92c52
Author: Wolfgang Schweer <wschweer at arcor.de>
Date: Sun Nov 13 17:28:57 2016 +0100
Fix update-d-e-a-(lines|softwaves|spacefun) (Closes: #766088, #789084).
Remove manual alternatives configuration, use only priorities.
Add function to unlink login-background.svg and use it upon removal.
Ensure that a theme is activated after theme package installation.
Remove wrong second entry for spacefun desktop-background.
(The problem of non-determinism after upgrades if two or all three theme
packages are installed has still to be solved.)
update-d-e-a-(lines|softwaves|spacefun): Replace update-grub2 with
update-grub.
Use variables in d-e-a-(lines|softwaves|spacefun).postinst to ease adding
of new themes.
---
debian/changelog | 11 ++++++++
debian/debian-edu-artwork-lines.postinst | 8 +++---
debian/debian-edu-artwork-softwaves.postinst | 8 +++---
debian/debian-edu-artwork-spacefun.postinst | 8 +++---
debian/update-debian-edu-artwork-lines | 39 ++++++++++++++++------------
debian/update-debian-edu-artwork-softwaves | 39 ++++++++++++++++------------
debian/update-debian-edu-artwork-spacefun | 39 ++++++++++++++++------------
7 files changed, 92 insertions(+), 60 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 7f8bfbb..e7c7988 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,17 @@ debian-edu-artwork (0.901-1) UNRELEASED; urgency=medium
* Add triggers d/debian-edu-artwork-(lines|softwaves|spacefun) to fix
the d-e-artwork configuration in case d-e-a-(lines|softwaves|spacefun)
has been installed before plasma-desktop-data.
+ * Fix update-d-e-a-(lines|softwaves|spacefun) (Closes: #766088, #789084).
+ - Remove manual alternatives configuration, use only priorities.
+ - Add function to unlink login-background.svg and use it upon removal.
+ - Ensure that a theme is activated after theme package installation.
+ - Remove wrong second entry for spacefun desktop-background.
+ (The problem of non-determinism after upgrades if two or all three theme
+ packages are installed has still to be solved.)
+ * update-d-e-a-(lines|softwaves|spacefun): Replace update-grub2 with
+ update-grub.
+ * Use variables in d-e-a-(lines|softwaves|spacefun).postinst to ease adding
+ of new themes.
-- Wolfgang Schweer <wschweer at arcor.de> Thu, 10 Nov 2016 11:53:17 +0100
diff --git a/debian/debian-edu-artwork-lines.postinst b/debian/debian-edu-artwork-lines.postinst
index f2ba360..66908cb 100755
--- a/debian/debian-edu-artwork-lines.postinst
+++ b/debian/debian-edu-artwork-lines.postinst
@@ -4,13 +4,15 @@ set -e
#DEBHELPER#
+EDUTHEME="lines"
+
case "$1" in
configure)
- update-debian-edu-artwork-lines configure
+ update-debian-edu-artwork-$EDUTHEME configure
;;
triggered)
- if readlink /usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/20-desktop-base-edu.js | grep lines ; then
- update-debian-edu-artwork-lines configure
+ if readlink /usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/20-desktop-base-edu.js | grep $EDUTHEME ; then
+ update-debian-edu-artwork-$EDUTHEME configure
fi
;;
esac
diff --git a/debian/debian-edu-artwork-softwaves.postinst b/debian/debian-edu-artwork-softwaves.postinst
index b171057..b8b50fa 100755
--- a/debian/debian-edu-artwork-softwaves.postinst
+++ b/debian/debian-edu-artwork-softwaves.postinst
@@ -4,13 +4,15 @@ set -e
#DEBHELPER#
+EDUTHEME="softwaves"
+
case "$1" in
configure)
- update-debian-edu-artwork-softwaves configure
+ update-debian-edu-artwork-$EDUTHEME configure
;;
triggered)
- if readlink /usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/20-desktop-base-edu.js | grep softwaves ; then
- update-debian-edu-artwork-softwaves configure
+ if readlink /usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/20-desktop-base-edu.js | grep $EDUTHEME ; then
+ update-debian-edu-artwork-$EDUTHEME configure
fi
;;
esac
diff --git a/debian/debian-edu-artwork-spacefun.postinst b/debian/debian-edu-artwork-spacefun.postinst
index 466474b..fd04c9b 100755
--- a/debian/debian-edu-artwork-spacefun.postinst
+++ b/debian/debian-edu-artwork-spacefun.postinst
@@ -4,13 +4,15 @@ set -e
#DEBHELPER#
+EDUTHEME="spacefun"
+
case "$1" in
configure)
- update-debian-edu-artwork-spacefun configure
+ update-debian-edu-artwork-$EDUTHEME configure
;;
triggered)
- if readlink /usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/20-desktop-base-edu.js | grep spacefun ; then
- update-debian-edu-artwork-spacefun configure
+ if readlink /usr/share/plasma/shells/org.kde.plasma.desktop/contents/updates/20-desktop-base-edu.js | grep $EDUTHEME ; then
+ update-debian-edu-artwork-$EDUTHEME configure
fi
;;
esac
diff --git a/debian/update-debian-edu-artwork-lines b/debian/update-debian-edu-artwork-lines
index 8bb456f..70a30f3 100755
--- a/debian/update-debian-edu-artwork-lines
+++ b/debian/update-debian-edu-artwork-lines
@@ -5,9 +5,7 @@ EDUTHEME="lines"
change_ldm_background() {
update-alternatives --install /usr/share/ldm/themes/default \
- ldm-theme /usr/share/ldm/themes/debian-edu-${EDUTHEME} 85
- update-alternatives --set ldm-theme \
- /usr/share/ldm/themes/debian-edu-${EDUTHEME}
+ ldm-theme /usr/share/ldm/themes/debian-edu-${EDUTHEME} 75
}
restore_ldm_background() {
@@ -16,21 +14,18 @@ restore_ldm_background() {
## GRUB and PXE boot background
change_grub_background() {
- priority=50 # value higher than 20 used for ${EDUTHEME}-grub.png in desktop-base
update-alternatives --install \
/usr/share/images/desktop-base/desktop-grub.png \
desktop-grub \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub.png $priority
- update-alternatives --set desktop-grub \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub.png
+ /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub.png 30
update-alternatives --install \
/usr/share/images/desktop-base/desktop-grub.png \
desktop-grub \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub_1920x1080.png 20
+ /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub_1920x1080.png 25
ln -sf debian-edu-${EDUTHEME}-grub.png /usr/share/images/desktop-base/debian-edu-pxe.png
- if which update-grub2 > /dev/null ; then
+ if which update-grub > /dev/null ; then
sync
- update-grub2 || true
+ update-grub || true
fi
}
@@ -40,8 +35,8 @@ restore_grub_background() {
update-alternatives --remove desktop-grub \
/usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub_1920x1080.png
rm -f /usr/share/images/desktop-base/debian-edu-pxe.png
- if which update-grub2 > /dev/null ; then
- update-grub2 || true
+ if which update-grub > /dev/null ; then
+ update-grub || true
fi
}
@@ -51,14 +46,10 @@ change_desktop_background() {
/usr/share/images/desktop-base/desktop-background \
desktop-background \
/usr/share/images/desktop-base/debian-edu-${EDUTHEME}-wallpaper_1920x1080.svg 75
- update-alternatives --set desktop-background \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-wallpaper_1920x1080.svg
update-alternatives --install \
/usr/share/images/desktop-base/desktop-background.xml \
desktop-background.xml \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}.xml 20
- update-alternatives --set desktop-background.xml \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}.xml
+ /usr/share/images/desktop-base/debian-edu-${EDUTHEME}.xml 30
for WALLPAPER in debian-edu-${EDUTHEME}-wallpaper_1024x768.svg \
debian-edu-${EDUTHEME}-wallpaper_1600x1200.svg \
@@ -103,6 +94,12 @@ symlink_login_background() {
fi
}
+unlink_login_background() {
+ if [ -h /usr/share/images/desktop-base/login-background.svg ] ; then
+ rm -f /usr/share/images/desktop-base/login-background.svg
+ fi
+}
+
symlink_gnome_shell_css() {
if [ -f /usr/share/gnome-shell/theme/gnome-shell.css.edu-diverted ]; then
ln -fs /usr/share/gnome-shell/theme/debian-edu-${EDUTHEME}-gnome-shell.css /usr/share/gnome-shell/theme/gnome-shell.css
@@ -140,6 +137,13 @@ set_plymouth_theme() {
case "$1" in
configure)
+ if [ -x /usr/sbin/update-debian-edu-artwork-spacefun ]; then
+ update-debian-edu-artwork-spacefun remove
+ fi
+ if [ -x /usr/sbin/update-debian-edu-artwork-softwaves ]; then
+ update-debian-edu-artwork-softwaves remove
+ fi
+ unlink_login_background
change_ldm_background
change_grub_background
change_desktop_background
@@ -150,6 +154,7 @@ case "$1" in
symlink_gnome_shell_css
;;
remove)
+ unlink_login_background
restore_ldm_background
restore_grub_background
restore_desktop_background
diff --git a/debian/update-debian-edu-artwork-softwaves b/debian/update-debian-edu-artwork-softwaves
index 788bead..d405d5c 100755
--- a/debian/update-debian-edu-artwork-softwaves
+++ b/debian/update-debian-edu-artwork-softwaves
@@ -5,9 +5,7 @@ EDUTHEME="softwaves"
change_ldm_background() {
update-alternatives --install /usr/share/ldm/themes/default \
- ldm-theme /usr/share/ldm/themes/debian-edu-${EDUTHEME} 85
- update-alternatives --set ldm-theme \
- /usr/share/ldm/themes/debian-edu-${EDUTHEME}
+ ldm-theme /usr/share/ldm/themes/debian-edu-${EDUTHEME} 75
}
restore_ldm_background() {
@@ -16,21 +14,18 @@ restore_ldm_background() {
## GRUB and PXE boot background
change_grub_background() {
- priority=50 # value higher than 20 used for ${EDUTHEME}-grub.png in desktop-base
update-alternatives --install \
/usr/share/images/desktop-base/desktop-grub.png \
desktop-grub \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub.png $priority
- update-alternatives --set desktop-grub \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub.png
+ /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub.png 30
update-alternatives --install \
/usr/share/images/desktop-base/desktop-grub.png \
desktop-grub \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub_1920x1080.png 20
+ /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub_1920x1080.png 25
ln -sf debian-edu-${EDUTHEME}-grub.png /usr/share/images/desktop-base/debian-edu-pxe.png
- if which update-grub2 > /dev/null ; then
+ if which update-grub > /dev/null ; then
sync
- update-grub2 || true
+ update-grub || true
fi
}
@@ -40,8 +35,8 @@ restore_grub_background() {
update-alternatives --remove desktop-grub \
/usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub_1920x1080.png
rm -f /usr/share/images/desktop-base/debian-edu-pxe.png
- if which update-grub2 > /dev/null ; then
- update-grub2 || true
+ if which update-grub > /dev/null ; then
+ update-grub || true
fi
}
@@ -51,14 +46,10 @@ change_desktop_background() {
/usr/share/images/desktop-base/desktop-background \
desktop-background \
/usr/share/images/desktop-base/debian-edu-${EDUTHEME}-wallpaper_1920x1080.svg 75
- update-alternatives --set desktop-background \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-wallpaper_1920x1080.svg
update-alternatives --install \
/usr/share/images/desktop-base/desktop-background.xml \
desktop-background.xml \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}.xml 20
- update-alternatives --set desktop-background.xml \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}.xml
+ /usr/share/images/desktop-base/debian-edu-${EDUTHEME}.xml 30
for WALLPAPER in debian-edu-${EDUTHEME}-wallpaper_1024x768.svg \
debian-edu-${EDUTHEME}-wallpaper_1600x1200.svg \
@@ -103,6 +94,12 @@ symlink_login_background() {
fi
}
+unlink_login_background() {
+ if [ -h /usr/share/images/desktop-base/login-background.svg ] ; then
+ rm -f /usr/share/images/desktop-base/login-background.svg
+ fi
+}
+
symlink_gnome_shell_css() {
if [ -f /usr/share/gnome-shell/theme/gnome-shell.css.edu-diverted ]; then
ln -fs /usr/share/gnome-shell/theme/debian-edu-${EDUTHEME}-gnome-shell.css /usr/share/gnome-shell/theme/gnome-shell.css
@@ -140,6 +137,13 @@ set_plymouth_theme() {
case "$1" in
configure)
+ if [ -x /usr/sbin/update-debian-edu-artwork-spacefun ]; then
+ update-debian-edu-artwork-spacefun remove
+ fi
+ if [ -x /usr/sbin/update-debian-edu-artwork-lines ]; then
+ update-debian-edu-artwork-lines remove
+ fi
+ unlink_login_background
change_ldm_background
change_grub_background
change_desktop_background
@@ -150,6 +154,7 @@ case "$1" in
symlink_gnome_shell_css
;;
remove)
+ unlink_login_background
restore_ldm_background
restore_grub_background
restore_desktop_background
diff --git a/debian/update-debian-edu-artwork-spacefun b/debian/update-debian-edu-artwork-spacefun
index b7c1e9f..f2cf63d 100755
--- a/debian/update-debian-edu-artwork-spacefun
+++ b/debian/update-debian-edu-artwork-spacefun
@@ -5,9 +5,7 @@ EDUTHEME="spacefun"
change_ldm_background() {
update-alternatives --install /usr/share/ldm/themes/default \
- ldm-theme /usr/share/ldm/themes/debian-edu-${EDUTHEME} 85
- update-alternatives --set ldm-theme \
- /usr/share/ldm/themes/debian-edu-${EDUTHEME}
+ ldm-theme /usr/share/ldm/themes/debian-edu-${EDUTHEME} 75
}
restore_ldm_background() {
@@ -17,17 +15,14 @@ restore_ldm_background() {
## GRUB and PXE boot background
change_grub_background() {
- priority=50 # value higher than 20 used for ${EDUTHEME}-grub.png in desktop-base
update-alternatives --install \
/usr/share/images/desktop-base/desktop-grub.png \
desktop-grub \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub.png $priority
- update-alternatives --set desktop-grub \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub.png
+ /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub.png 30
ln -sf debian-edu-${EDUTHEME}-grub.png /usr/share/images/desktop-base/debian-edu-pxe.png
- if which update-grub2 > /dev/null ; then
+ if which update-grub > /dev/null ; then
sync
- update-grub2 || true
+ update-grub || true
fi
}
@@ -35,8 +30,8 @@ restore_grub_background() {
update-alternatives --remove desktop-grub \
/usr/share/images/desktop-base/debian-edu-${EDUTHEME}-grub.png
rm -f /usr/share/images/desktop-base/debian-edu-pxe.png
- if which update-grub2 > /dev/null ; then
- update-grub2 || true
+ if which update-grub > /dev/null ; then
+ update-grub || true
fi
}
@@ -46,18 +41,13 @@ change_desktop_background() {
/usr/share/images/desktop-base/desktop-background \
desktop-background \
/usr/share/images/desktop-base/debian-edu-${EDUTHEME}-wallpaper01_1920x1080.png 75
- update-alternatives --set desktop-background \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}-wallpaper01_1920x1080.png
update-alternatives --install \
/usr/share/images/desktop-base/desktop-background.xml \
desktop-background.xml \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}.xml 20
- update-alternatives --set desktop-background.xml \
- /usr/share/images/desktop-base/debian-edu-${EDUTHEME}.xml
+ /usr/share/images/desktop-base/debian-edu-${EDUTHEME}.xml 30
for WALLPAPER in debian-edu-${EDUTHEME}-wallpaper01_1280x1024.png \
debian-edu-${EDUTHEME}-wallpaper01_1600x1200.svg \
debian-edu-${EDUTHEME}-wallpaper01_1600x1200.png \
- debian-edu-${EDUTHEME}-wallpaper01_1920x1080.png \
debian-edu-${EDUTHEME}-wallpaper01_1920x1200.png; do
update-alternatives --install \
/usr/share/images/desktop-base/desktop-background \
@@ -97,6 +87,12 @@ symlink_login_background() {
fi
}
+unlink_login_background() {
+ if [ -h /usr/share/images/desktop-base/login-background.svg ] ; then
+ rm -f /usr/share/images/desktop-base/login-background.svg
+ fi
+}
+
symlink_gnome_shell_css() {
if [ -f /usr/share/gnome-shell/theme/gnome-shell.css.edu-diverted ]; then
ln -fs /usr/share/gnome-shell/theme/debian-edu-${EDUTHEME}-gnome-shell.css /usr/share/gnome-shell/theme/gnome-shell.css
@@ -132,6 +128,13 @@ set_plymouth_theme() {
case "$1" in
configure)
+ if [ -x /usr/sbin/update-debian-edu-artwork-softwaves ]; then
+ update-debian-edu-artwork-softwaves remove
+ fi
+ if [ -x /usr/sbin/update-debian-edu-artwork-lines ]; then
+ update-debian-edu-artwork-lines remove
+ fi
+ unlink_login_background
change_ldm_background
change_grub_background
change_desktop_background
@@ -142,10 +145,12 @@ case "$1" in
symlink_gnome_shell_css
;;
remove)
+ unlink_login_background
restore_ldm_background
restore_grub_background
restore_desktop_background
compile_gschemas
+ unlink_login_background
unlink_kde_base_edu_js
unlink_gnome_shell_css
;;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-artwork.git
More information about the debian-edu-commits
mailing list