Package: pbuilder
Version: 0.196
Severity: minor
Tags: patch

Currently, scripts that modify the image in the "F" series of hooks have to be
idempotent, since they are not reversed when --save-after-{login,execute} is 
used.

Sometimes, it would be useful to instead split the script in two, one removing
what was done in the initialisation. This patch introduces the "H" series to 
undo
what was done at the "F" stage (or something else).

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable'), (100, 'unstable'), (50, 
'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages pbuilder depends on:
ii  coreutils                     7.4-2      The GNU core utilities
ii  debconf [debconf-2.0]         1.5.28     Debian configuration management sy
ii  debianutils                   3.2.2      Miscellaneous utilities specific t
ii  debootstrap                   1.0.20     Bootstrap a basic Debian system
ii  wget                          1.12-1.1   retrieves files from the web

Versions of packages pbuilder recommends:
ii  devscripts                    2.10.59    scripts to make the life of a Debi
ii  fakeroot                      1.14.4-1   Gives a fake root environment
ii  sudo                          1.7.2p1-1  Provide limited super user privile

Versions of packages pbuilder suggests:
pn  cowdancer                   <none>       (no description available)
ii  gdebi-core                  0.5.9debian2 Simple tool to install deb files
pn  pbuilder-uml                <none>       (no description available)

-- debconf information:
  pbuilder/nomirror:
* pbuilder/mirrorsite: http://ftp.fr.debian.org/debian/
* pbuilder/rewrite: false
diff -ur pbuilder-0.196.orig/pbuilder pbuilder-0.196/pbuilder
--- pbuilder-0.196.orig/pbuilder	2009-12-11 17:50:17.000000000 +0100
+++ pbuilder-0.196/pbuilder	2010-01-18 15:39:12.000000000 +0100
@@ -83,6 +83,7 @@
 		exit 1
 	    else
 		log "I: Saving the results, modifications to this session will persist"
+		executehooks "H"
 		unloadhooks
 		umountproc
 		trap cleanbuildplace_trap exit sighup
@@ -133,6 +134,7 @@
 		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"
+		executehooks "H"
 		unloadhooks
 		umountproc
 		trap cleanbuildplace_trap exit sighup
diff -ur pbuilder-0.196.orig/pbuilder.8 pbuilder-0.196/pbuilder.8
--- pbuilder-0.196.orig/pbuilder.8	2009-12-30 17:41:10.000000000 +0100
+++ pbuilder-0.196/pbuilder.8	2010-01-18 15:42:28.000000000 +0100
@@ -322,6 +322,17 @@
 .B "--create"
 target.
 
+.B "H<digit><digit><whatever-else-you-want>"
+is executed just before repacking the base
+tarball, when the user logged in or executed
+something with the
+.B "--login"
+or 
+.B "--execute"
+target and the corresponding
+.B "--save-after-"
+option.
+
 \" End of hookdir description
 
 .TP

Reply via email to