diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rwxr-xr-x | examples/execute_installtest.sh | 3 | ||||
-rwxr-xr-x | pbuilder-createbuildenv | 12 | ||||
-rwxr-xr-x | pbuilder-updatebuildenv | 9 |
6 files changed, 26 insertions, 6 deletions
@@ -1,5 +1,10 @@ 2003-12-16 Junichi Uekawa <dancer@debian.org> + * pbuilder-createbuildenv (DEBOOTSTRAPSCRIPT): use $TRAP instead of trap, + and set TRAP to trap only when PRESERVE_BUILDPLACE is not yes. + + * Makefile (install): install new examples. + * Documentation/pbuilder-doc.xml: Document execute_installtest.sh * examples/execute_installtest.sh: Install testing script. Calls apt. @@ -68,6 +68,8 @@ install: $(INSTALL_EXECUTABLE) examples/B91dpkg-i $(DESTDIR)/usr/share/doc/pbuilder/examples $(INSTALL_EXECUTABLE) examples/C10shell $(DESTDIR)/usr/share/doc/pbuilder/examples $(INSTALL_EXECUTABLE) examples/D10tmp $(DESTDIR)/usr/share/doc/pbuilder/examples + $(INSTALL_EXECUTABLE) examples/execute_installtest.sh $(DESTDIR)/usr/share/doc/pbuilder/examples + $(INSTALL_EXECUTABLE) examples/execute_paramtest.sh $(DESTDIR)/usr/share/doc/pbuilder/examples cd pbuildd; make install DESTDIR=$(DESTDIR) cd Documentation; make install DESTDIR=$(DESTDIR) diff --git a/debian/changelog b/debian/changelog index 302c86f..2450076 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ pbuilder (0.96) UNRELEASED; urgency=low * examples/execute_installtest.sh: Tries to 'apt-get install' a package and sees if it does install. * examples/execute_paramtest.sh: Just dumps the parameter. + TODO: umountproc is not called when error happens; that's not desirable. -- Junichi Uekawa <dancer@debian.org> Tue, 16 Dec 2003 08:22:46 +0900 diff --git a/examples/execute_installtest.sh b/examples/execute_installtest.sh index ba54f9d..6a3fb90 100755 --- a/examples/execute_installtest.sh +++ b/examples/execute_installtest.sh @@ -12,6 +12,7 @@ set -ex -apt-get install -y "$1" +apt-get install -y "$1" < /dev/null + diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv index 6888aa1..0a7b21e 100755 --- a/pbuilder-createbuildenv +++ b/pbuilder-createbuildenv @@ -28,6 +28,12 @@ if [ -z "$DISTRIBUTION" ]; then fi echo "Distribution is $DISTRIBUTION." +if [ "${PRESERVE_BUILDPLACE}" = "yes" ]; then + TRAP="echo ignoring trap " +else + TRAP=trap +fi + # first clean it. cleanbuildplace @@ -37,7 +43,7 @@ if [ ! -d "$BUILDPLACE" ]; then echo "pbuilder: Could not make directory [$BUILDPLACE]" >&2 exit 1 fi -trap cleanbuildplace exit +$TRAP cleanbuildplace exit echo " -> running debootstrap" DEBOOTSTRAPSCRIPT="" @@ -64,7 +70,7 @@ installaptlines echo "Refreshing the base.tgz " echo " -> upgrading packages" mountproc -trap umountproc_cleanbuildplace exit +$TRAP umountproc_cleanbuildplace exit $CHROOTEXEC /usr/bin/apt-get update if [ -n "$REMOVEPACKAGES" ]; then $CHROOTEXEC /usr/bin/dpkg --purge $REMOVEPACKAGES @@ -79,7 +85,7 @@ executehooks "E" unloadhooks umountproc -trap cleanbuildplace exit +$TRAP cleanbuildplace exit create_basetgz if [ "${PRESERVE_BUILDPLACE}" = "yes" ]; then diff --git a/pbuilder-updatebuildenv b/pbuilder-updatebuildenv index 2566459..aa9153c 100755 --- a/pbuilder-updatebuildenv +++ b/pbuilder-updatebuildenv @@ -25,9 +25,14 @@ set -e if [ -n "$DISTRIBUTION" ]; then echo "Upgrading for distribution $DISTRIBUTION" fi +if [ "${PRESERVE_BUILDPLACE}" = "yes" ]; then + TRAP="echo ignoring trap " +else + TRAP=trap +fi extractbuildplace -trap umountproc_cleanbuildplace exit +$TRAP umountproc_cleanbuildplace exit loadhooks echo "Refreshing the base.tgz " @@ -47,7 +52,7 @@ executehooks "E" unloadhooks umountproc -trap cleanbuildplace exit +$TRAP cleanbuildplace exit if [ ! "${INTERNAL_BUILD_UML}" = "yes" ]; then create_basetgz fi |