[Piuparts-commits] [piuparts] 05/07: move some exceptions to {pre, post}_test_exceptions

Holger Levsen holger at layer-acht.org
Wed Aug 2 21:12:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 5169ab88bf0b4775050bf8b22e1a873051752710
Author: Andreas Beckmann <anbe at debian.org>
Date:   Tue Aug 1 23:55:22 2017 +0200

    move some exceptions to {pre,post}_test_exceptions
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 custom-scripts/scripts/post_purge_exceptions  |  7 -----
 custom-scripts/scripts/post_test_exceptions   | 42 ++++++++++++++++++++++++++
 custom-scripts/scripts/pre_install_exceptions | 32 --------------------
 custom-scripts/scripts/pre_remove_exceptions  | 25 ----------------
 custom-scripts/scripts/pre_test_exceptions    | 43 +++++++++++++++++++++++++++
 debian/changelog                              |  1 +
 6 files changed, 86 insertions(+), 64 deletions(-)

diff --git a/custom-scripts/scripts/post_purge_exceptions b/custom-scripts/scripts/post_purge_exceptions
index 562dc61..3b15118 100755
--- a/custom-scripts/scripts/post_purge_exceptions
+++ b/custom-scripts/scripts/post_purge_exceptions
@@ -6,13 +6,6 @@ log_debug() {
 }
 
 case ${PIUPARTS_OBJECTS%%=*} in
-	fai-nfsroot)		log_debug
-				rm -f /.THIS_IS_THE_FAI_NFSROOT
-				;;
-	ltsp-client|\
-	ltsp-client-core)	log_debug
-				rm -f /etc/ltsp_chroot
-				;;
 	amd64-libs|amd64-libs-dev)
 		# leaves a superfluous empty line after purge
 		log_debug
diff --git a/custom-scripts/scripts/post_test_exceptions b/custom-scripts/scripts/post_test_exceptions
new file mode 100755
index 0000000..6a7627c
--- /dev/null
+++ b/custom-scripts/scripts/post_test_exceptions
@@ -0,0 +1,42 @@
+#!/bin/sh
+set -e
+
+log_debug() {
+	echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS"
+}
+
+# clean up from pre_test_exceptions
+case ${PIUPARTS_OBJECTS%%=*} in
+	fai-nfsroot)
+		log_debug
+		rm -fv /.THIS_IS_THE_FAI_NFSROOT
+		;;
+	freedombox-setup)
+		log_debug
+		if [ -e /etc/motd.orig ]; then
+			if [ -L /etc/motd ]; then
+				rm -v /etc/motd
+			fi
+			if [ ! -e /etc/motd ]; then
+				mv -v /etc/motd.orig /etc/motd
+			fi
+		fi
+		;;
+	ltsp-client-core|\
+	education-thin-client|\
+	ltsp-client)
+		log_debug
+		rm -fv /etc/ltsp_chroot
+		;;
+	reseed)
+		log_debug
+		test ! -L /usr/sbin/reseed || rm /usr/sbin/reseed
+		dpkg-divert --remove --rename /usr/sbin/reseed
+		;;
+	roger-router-cli|\
+	ffgtk|\
+	roger-router)
+		log_debug
+		dpkg-divert --remove --rename /usr/sbin/lpadmin
+		;;
+esac
diff --git a/custom-scripts/scripts/pre_install_exceptions b/custom-scripts/scripts/pre_install_exceptions
index 673129a..b8b72e9 100755
--- a/custom-scripts/scripts/pre_install_exceptions
+++ b/custom-scripts/scripts/pre_install_exceptions
@@ -72,38 +72,6 @@ case ${PIUPARTS_OBJECTS%%=*} in
 			mkdir -p /var/state/samhain/
 			touch /var/state/samhain/samhain_file
 			;;
-	fai-nfsroot)
-			# fai-nfsroot refuses installation unless this file exist
-			log_debug
-			touch /.THIS_IS_THE_FAI_NFSROOT
-			;;
-	education-thin-client|\
-	ltsp-client|\
-	ltsp-client-core)
-			# ltsp-client-core refuses installation unless this file exist
-			log_debug
-			touch /etc/ltsp_chroot
-			;;
-	ffgtk|\
-	roger-router|\
-	roger-router-cli)
-			# postinst tries to add a printer with lpadmin
-			log_debug
-			dpkg-divert --rename /usr/sbin/lpadmin
-			;;
-	freedombox-setup)
-			log_debug
-			# replaces /etc/motd by a symlink
-			if [ -e /etc/motd ] && [ ! -L /etc/motd ] && [ ! -e /etc/motd.orig ]; then
-				mv -v /etc/motd /etc/motd.orig
-			fi
-			;;
-	reseed)
-			log_debug
-			# postinst runs reseed which accesses the net
-			dpkg-divert --rename /usr/sbin/reseed
-			ln -s /bin/true /usr/sbin/reseed
-			;;
 	bugzilla3)
 			# checksetup.pl goes into infinite loop asking for them
 			log_debug
diff --git a/custom-scripts/scripts/pre_remove_exceptions b/custom-scripts/scripts/pre_remove_exceptions
index d8855e6..169d5d5 100755
--- a/custom-scripts/scripts/pre_remove_exceptions
+++ b/custom-scripts/scripts/pre_remove_exceptions
@@ -28,31 +28,6 @@ case ${PIUPARTS_OBJECTS%%=*} in
 		rm -f /usr/sbin/apt-listbugs
 		dpkg-divert --remove --rename /usr/sbin/apt-listbugs
 		;;
-	ffgtk|\
-	roger-router|\
-	roger-router-cli)
-		# cleanup from pre_install_exceptions
-		log_debug
-		dpkg-divert --remove --rename /usr/sbin/lpadmin
-		;;
-	freedombox-setup)
-		log_debug
-		# cleanup from pre_install_exceptions
-		if [ -e /etc/motd.orig ]; then
-			if [ -L /etc/motd ]; then
-				rm -v /etc/motd
-			fi
-			if [ ! -e /etc/motd ]; then
-				mv -v /etc/motd.orig /etc/motd
-			fi
-		fi
-		;;
-	reseed)
-		log_debug
-		# cleanup from pre_install_exceptions
-		test ! -L /usr/sbin/reseed || rm /usr/sbin/reseed
-		dpkg-divert --remove --rename /usr/sbin/reseed
-		;;
 esac
 
 case "$PIUPARTS_DISTRIBUTION" in
diff --git a/custom-scripts/scripts/pre_test_exceptions b/custom-scripts/scripts/pre_test_exceptions
new file mode 100755
index 0000000..08198fa
--- /dev/null
+++ b/custom-scripts/scripts/pre_test_exceptions
@@ -0,0 +1,43 @@
+#!/bin/sh
+set -e
+
+log_debug() {
+	echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS"
+}
+
+case ${PIUPARTS_OBJECTS%%=*} in
+	fai-nfsroot)
+		# fai-nfsroot refuses installation unless this file exists
+		log_debug
+		echo "Touching /.THIS_IS_THE_FAI_NFSROOT"
+		touch /.THIS_IS_THE_FAI_NFSROOT
+		;;
+	freedombox-setup)
+		# replaces /etc/motd by a symlink
+		log_debug
+		if [ -e /etc/motd ] && [ ! -L /etc/motd ] && [ ! -e /etc/motd.orig ]; then
+			mv -v /etc/motd /etc/motd.orig
+		fi
+		;;
+	ltsp-client-core|\
+	education-thin-client|\
+	ltsp-client)
+		# ltsp-client-core refuses installation unless this file exists
+		log_debug
+		echo "Touching /etc/ltsp_chroot"
+		touch /etc/ltsp_chroot
+		;;
+	reseed)
+		# postinst runs reseed which accesses the net
+		log_debug
+		dpkg-divert --rename /usr/sbin/reseed
+		ln -s /bin/true /usr/sbin/reseed
+		;;
+	roger-router-cli|\
+	ffgtk|\
+	roger-router)
+		# roger-router-cli.postinst tries to add a printer with lpadmin
+		log_debug
+		dpkg-divert --rename /usr/sbin/lpadmin
+		;;
+esac
diff --git a/debian/changelog b/debian/changelog
index 16add75..a41d3e7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ piuparts (0.79) UNRELEASED; urgency=medium
   * piuparts.py:
     - Add post_test_* custom scripts. These are run exactly once at the end
       of each test (before comparing with the reference chroot state).
+  * Move some exceptions to {pre,post}_test_exceptions.
 
  -- Holger Levsen <holger at debian.org>  Mon, 31 Jul 2017 13:35:18 -0400
 

-- 
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