Package: dpatch Version: 2.0.27 Followup-For: Bug #397290 I would like this too. I propose to implement it by adding a configuration option DPEP_PREPATCHTARGET which is run before applying patches.
Implemented in attached patch. -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.21-2-686 (SMP w/1 CPU core) Locale: LANG=en_DK.ISO-8859-15, LC_CTYPE=en_DK.ISO-8859-15 (charmap=ISO-8859-15) Shell: /bin/sh linked to /bin/bash dpatch depends on no packages. Versions of packages dpatch recommends: ii dpkg-dev 1.14.7 package building tools for Debian ii fakeroot 1.8.2 Gives a fake root environment ii patchutils 0.2.31-4 Utilities to work with patches -- no debconf information
--- /usr/bin/dpatch-edit-patch 2007-08-03 14:32:04.000000000 +0200 +++ /tmp/dpatch-edit-patch 2007-11-07 12:23:08.647732277 +0100 @@ -42,6 +42,7 @@ DPEP_SHELL="${DPEP_SHELL:-${conf_shell:-${SHELL:-$(getent passwd $(id -un) | cut -f7- -d:)}}}" DPEP_EXCLUDE="${DPEP_EXCLUDE:-${conf_exclude:-CVS .svn .git .arch .hg _darcs .bzr}}" DPEP_ORIGTARGZPATH="${DPEP_ORIGTARGZPATH:-${conf_origtargzpath:-}}" +DPEP_PREPATCHTARGET="${DPEP_PREPATCHTARGET:-${conf_prepatchtarget:-}}" # We special-case $DPEP_ROOTCMD later, after dpep_parse_options() @@ -225,6 +226,11 @@ $DPEP_ROOTCMD debian/rules clean unpatch dpatch deapply-all +if [ -n "$DPEP_PREPATCHTARGET" ]; then + dpep_message norm "* Running pre patch target $DPEPPREPATCHTARGET" + $DPEP_ROOTCMD debian/rules $DPEP_PREPATCHTARGET +fi + if [[ ! -z "$DPEP_BASEPATCH" ]]; then if ! dpatch list-all | grep -F "${DPEP_BASEPATCH%%.dpatch}" > /dev/null 2>&1; then if [[ "$DPEP_EDITPATCH" = 1 ]]; then