[Collab-qa-commits] r1863 - debcluster/scripts
Lucas Nussbaum
lucas at alioth.debian.org
Sat Dec 11 21:17:18 UTC 2010
Author: lucas
Date: 2010-12-11 21:17:18 +0000 (Sat, 11 Dec 2010)
New Revision: 1863
Modified:
debcluster/scripts/create-instest-chroots.bash
Log:
add a dpkg hook to auto set -x in maintainer scripts
Modified: debcluster/scripts/create-instest-chroots.bash
===================================================================
--- debcluster/scripts/create-instest-chroots.bash 2010-12-11 21:16:52 UTC (rev 1862)
+++ debcluster/scripts/create-instest-chroots.bash 2010-12-11 21:17:18 UTC (rev 1863)
@@ -21,6 +21,22 @@
debconf debconf/priority select critical
linux-image-2.6.32-5-amd64 linux-image-2.6.32-5-amd64/prerm/removing-running-kernel-2.6.32-5-amd64 boolean false
" | chroot squeeze-root debconf-set-selections
+cat << EOF > squeeze-root/root/maintscripts
+#!/bin/bash
+[ "\$DPKG_HOOK_ACTION" == 'unpack' ] || exit 0
+for i in /var/lib/dpkg/info/*.{post,pre}{inst,rm}; do
+ if sed 1q \$i | grep -q -E "/bin/(ba)?sh"; then
+ if ! sed 2q \$i | grep -q -- -x; then
+ echo "Dpkg hook: enabling sh trace for \$i"
+ sed -i '2i set -x' \$i
+ fi
+ fi
+done
+EOF
+chmod 755 squeeze-root/root/maintscripts
+mkdir -p squeeze-root/etc/dpkg
+echo 'post-invoke=/root/maintscripts' > squeeze-root/etc/dpkg/dpkg.cfg
+
echo "#!/bin/sh
exit 101
" > squeeze-root/usr/sbin/policy-rc.d
@@ -43,6 +59,7 @@
crm114 crm114/cssupgrade boolean true
crm114 crm114/forceupgrade boolean true
" | chroot lenny-root debconf-set-selections
+
echo "#!/bin/sh
exit 101
" > lenny-root/usr/sbin/policy-rc.d
More information about the Collab-qa-commits
mailing list