Updated patch attached, as per discussion on IRC. -- |8]
>From ea6ebe371c5b5a1c66576504e199c73bc7383db1 Mon Sep 17 00:00:00 2001 From: Gergely Nagy <[email protected]> Date: Wed, 23 Sep 2015 10:12:43 +0200 Subject: [PATCH] Dh_Lib: Export an env var before running +x scripts In order to let executable scripts discover what package is being built, so they can avoid side-effects in case a package is to be skipped, export DH_CONFIG_ACT_ON_PACKAGES before running them. This, along with changes to dh-exec, will close #698054. Signed-off-by: Gergely Nagy <[email protected]> --- Debian/Debhelper/Dh_Lib.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index a5743e9..af3b3ac 100644 --- a/Debian/Debhelper/Dh_Lib.pm +++ b/Debian/Debhelper/Dh_Lib.pm @@ -760,7 +760,9 @@ sub filedoublearray { if ($x) { require Cwd; my $cmd=Cwd::abs_path($file); + $ENV{"DH_CONFIG_ACT_ON_PACKAGES"} = join(",", @{$dh{"DOPACKAGES"}}); open (DH_FARRAY_IN, "$cmd |") || error("cannot run $file: $!"); + delete $ENV{"DH_CONFIG_ACT_ON_PACKAGES"}; } else { open (DH_FARRAY_IN, $file) || error("cannot read $file: $!"); -- 2.5.1

