[Piuparts-commits] [piuparts] 02/06: scripts: rework file-rc and upstart exceptions
Holger Levsen
holger at moszumanska.debian.org
Mon Nov 17 01:13:50 UTC 2014
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit 160724bfe2a7352a7c865674dafb906a3aecd30d
Author: Andreas Beckmann <anbe at debian.org>
Date: Sun Nov 16 23:40:27 2014 +0100
scripts: rework file-rc and upstart exceptions
Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
custom-scripts/scripts/post_purge_exceptions | 5 ----
custom-scripts/scripts/post_remove_exceptions | 18 +++++++++++++
custom-scripts/scripts/pre_install_exceptions | 37 ++++++++++++++++++---------
3 files changed, 43 insertions(+), 17 deletions(-)
diff --git a/custom-scripts/scripts/post_purge_exceptions b/custom-scripts/scripts/post_purge_exceptions
index 185e959..e71a6ba 100755
--- a/custom-scripts/scripts/post_purge_exceptions
+++ b/custom-scripts/scripts/post_purge_exceptions
@@ -13,11 +13,6 @@ case ${PIUPARTS_OBJECTS%%=*} in
ltsp-client-core) log_debug
rm -f /etc/ltsp_chroot
;;
- file-rc) log_debug
- # removal wont work if sysv-rc isn't reinstalled
- yes 'Yes, do as I say!' | apt-get -y --force-yes install sysv-rc
- dpkg --purge file-rc
- ;;
amd64-libs|amd64-libs-dev)
# leaves a superfluous empty line after purge
log_debug
diff --git a/custom-scripts/scripts/post_remove_exceptions b/custom-scripts/scripts/post_remove_exceptions
new file mode 100755
index 0000000..7a6258c
--- /dev/null
+++ b/custom-scripts/scripts/post_remove_exceptions
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -e
+
+log_debug() {
+ echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS"
+}
+
+case ${PIUPARTS_OBJECTS%%=*} in
+ file-rc)
+ case "$PIUPARTS_DISTRIBUTION" in
+ lenny|squeeze*)
+ log_debug
+ # removal wont work if sysv-rc isn't reinstalled
+ yes 'Yes, do as I say!' | apt-get -y --force-yes install sysv-rc
+ ;;
+ esac
+ ;;
+esac
diff --git a/custom-scripts/scripts/pre_install_exceptions b/custom-scripts/scripts/pre_install_exceptions
index 398acf7..48ef281 100755
--- a/custom-scripts/scripts/pre_install_exceptions
+++ b/custom-scripts/scripts/pre_install_exceptions
@@ -6,6 +6,31 @@ log_debug() {
}
case ${PIUPARTS_OBJECTS%%=*} in
+ file-rc)
+ case "$PIUPARTS_DISTRIBUTION" in
+ lenny|squeeze*)
+ # force installation and removal of essential package sysv-rc
+ log_debug
+ yes 'Yes, do as I say!' | apt-get -y --force-yes install file-rc
+ ;;
+ esac
+ ;;
+ live-config-upstart|\
+ netscript-2.4-upstart|\
+ upstart-dconf-bridge|\
+ upstart-monitor|\
+ upstart)
+ case "$PIUPARTS_DISTRIBUTION" in
+ squeeze*|wheezy*)
+ # force installation and removal of essential package sysvinit
+ log_debug
+ yes 'Yes, do as I say!' | apt-get -y --force-yes install upstart
+ ;;
+ esac
+ ;;
+esac
+
+case ${PIUPARTS_OBJECTS%%=*} in
samhain) log_debug
# work around #749602
mkdir -p /var/state/samhain/
@@ -21,18 +46,6 @@ case ${PIUPARTS_OBJECTS%%=*} in
# ltsp-client-core refuses installation unless this file exist
touch /etc/ltsp_chroot
;;
- live-config-upstart|\
- netscript-2.4-upstart|\
- upstart-dconf-bridge|\
- upstart-monitor|\
- upstart) log_debug
- # force installation and removal of essential package sysvinit
- yes 'Yes, do as I say!' | apt-get -y --force-yes install upstart
- ;;
- file-rc) log_debug
- # force installation and removal of essential package sysv-rc
- yes 'Yes, do as I say!' | apt-get -y --force-yes install file-rc
- ;;
systemd-sysv) log_debug
# force installation and removal of essential package sysvinit
yes 'Yes, do as I say!' | apt-get -y --force-yes install systemd-sysv
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list