Package: pbuilder
Version: 0.121
Followup-For: Bug #271600

Patch to recover and save the apt cache within a pbuilder login session
as pbuilder build does. Uses pieces of code by pbuilder-buildpackage.

Changes default behavior.

Regards,
Danilo

-- 
Danilo Piazzalunga                     +--------------------+
PGP Key available at subkeys.pgp.net   | Linux User #245762 |
Fingerprint: D018 815E 8C7F 2AE2 5565  | ICQ #105550412     |
             0C36 B5F6 DB20 B800 CB9F  +--------------------+
diff -Nru pbuilder-0.121.orig/pbuilder pbuilder-0.121/pbuilder
--- pbuilder-0.121.orig/pbuilder        2005-01-04 02:44:08.000000000 +0100
+++ pbuilder-0.121/pbuilder     2005-02-18 00:45:58.063285752 +0100
@@ -56,6 +56,9 @@
        extractbuildplace
        trap umountproc_cleanbuildplace exit
        loadhooks
+       recover_aptcache
+       trap saveaptcache_umountproc_cleanbuildplace exit
+
        if [ "${INTERNAL_BUILD_UML}" = "yes" ]; then
            echo " -> entering the shell"
        else
@@ -66,6 +69,9 @@
        executehooks "F"
        chroot "$BUILDPLACE" bin/bash
 
+       save_aptcache
+       trap umountproc_cleanbuildplace exit
+
        # saving the place afterwards
        if [ "${SAVE_AFTER_LOGIN}" = "yes" ]; then
            if [ "${INTERNAL_BUILD_UML}" = "yes" ]; then

Reply via email to