diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-10-13 18:02:46 +0000 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2015-10-13 18:02:46 +0000 |
commit | 9688b22bc39f3bff45dc1b0965fc0ad9e4260752 (patch) | |
tree | a434950a0237a8f5fa496a564cae4ae3e8dcf173 | |
parent | 5cd1f5e92353bb228a422222d998e7fd6fd0a7ae (diff) | |
download | pbuilder-9688b22bc39f3bff45dc1b0965fc0ad9e4260752.tar pbuilder-9688b22bc39f3bff45dc1b0965fc0ad9e4260752.tar.gz |
always load hooks just after extracting the build place, and unload them when cleaning up
So, no need to load&run&unload everywhere as it is now.
Gbp-Dch: Short
-rwxr-xr-x | pbuilder | 5 | ||||
-rwxr-xr-x | pbuilder-buildpackage | 1 | ||||
-rwxr-xr-x | pbuilder-createbuildenv | 2 | ||||
-rw-r--r-- | pbuilder-modules | 5 | ||||
-rwxr-xr-x | pbuilder-updatebuildenv | 2 |
5 files changed, 5 insertions, 10 deletions
@@ -57,7 +57,6 @@ case "$1" in extractbuildplace trap umountproc_cleanbuildplace_trap exit sighup copyinputfile "${BUILDPLACE}$BUILDDIR" - loadhooks recover_aptcache trap saveaptcache_umountproc_cleanbuildplace_trap exit sighup @@ -83,7 +82,6 @@ File extracted to: $BUILDPLACE exit 1 else log "I: Saving the results, modifications to this session will persist" - unloadhooks umountproc trap cleanbuildplace_trap exit sighup ${CHROOTEXEC} /usr/bin/apt-get clean || true @@ -112,7 +110,6 @@ File extracted to: $BUILDPLACE trap umountproc_cleanbuildplace_trap exit sighup copyinputfile "${BUILDPLACE}$BUILDDIR" - loadhooks recover_aptcache trap saveaptcache_umountproc_cleanbuildplace_trap exit sighup @@ -133,7 +130,6 @@ File extracted to: $BUILDPLACE log "E: Invalid combination of internal-build-uml and save-after-login flags" else log "I: Saving the results, modifications to this session will persist" - unloadhooks umountproc trap cleanbuildplace_trap exit sighup ${CHROOTEXEC} /usr/bin/apt-get clean || true @@ -153,7 +149,6 @@ File extracted to: $BUILDPLACE . /usr/lib/pbuilder/pbuilder-runhooks extractbuildplace trap umountproc_cleanbuildplace_trap exit sighup - loadhooks executehooks "F" log "I: start dump config" log "I: set" diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage index e949226..90931a3 100755 --- a/pbuilder-buildpackage +++ b/pbuilder-buildpackage @@ -81,7 +81,6 @@ export HOME="$BUILDDIR" echobacktime extractbuildplace trap umountproc_cleanbuildplace_trap exit sighup sigpipe -loadhooks if [ ! -d "${BUILDRESULT}" ]; then if [ -n "${BUILDRESULT}" ] ; then diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv index 9600360..15be713 100755 --- a/pbuilder-createbuildenv +++ b/pbuilder-createbuildenv @@ -81,7 +81,6 @@ if ! ( "${DEBOOTSTRAP}" \ fi log "I: debootstrap finished" -loadhooks mkdir -p "${BUILDPLACE}$BUILDDIR" @@ -128,7 +127,6 @@ $CHROOTEXEC /usr/bin/apt-get -q -y "${APTGETOPT[@]}" install \ save_aptcache executehooks "E" -unloadhooks umountproc $CHROOTEXEC /usr/bin/apt-get clean || true $TRAP cleanbuildplace_trap exit sighup diff --git a/pbuilder-modules b/pbuilder-modules index 0404d88..de967b3 100644 --- a/pbuilder-modules +++ b/pbuilder-modules @@ -17,6 +17,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +. /usr/lib/pbuilder/pbuilder-runhooks function showhelp () { cat <<EOF @@ -371,6 +372,7 @@ function cleanbuildplace () { if [ "$?" -ne 0 ]; then log "W: Aborting with an error"; fi + unloadhooks if [ "${INTERNAL_BUILD_UML}" != "yes" ]; then if [ -d "$BUILDPLACE" ]; then # A directory on the same partition as $BUILDPLACE, bind-mounted @@ -491,6 +493,7 @@ function extractbuildplace () { fi fi copy_local_configuration + loadhooks # installaptlines may fail with exit 1, do it earlier than mountproc. if [ "$OVERRIDE_APTLINES" = "yes" ]; then @@ -575,6 +578,8 @@ function save_aptcache() { } function create_basetgz() { + # don't pack the hooks in + unloadhooks # create base.tgz ( if ! cd "$BUILDPLACE"; then diff --git a/pbuilder-updatebuildenv b/pbuilder-updatebuildenv index df5014e..f745cf4 100755 --- a/pbuilder-updatebuildenv +++ b/pbuilder-updatebuildenv @@ -36,7 +36,6 @@ echobacktime extractbuildplace $TRAP umountproc_cleanbuildplace_trap exit sighup -loadhooks log "I: Refreshing the base.tgz " log "I: upgrading packages" $CHROOTEXEC /usr/bin/apt-get -q update @@ -120,7 +119,6 @@ fi $TRAP umountproc_cleanbuildplace_trap exit sighup executehooks "E" -unloadhooks umountproc $CHROOTEXEC /usr/bin/apt-get clean || true |