summaryrefslogtreecommitdiff
path: root/dh_builddeb
diff options
context:
space:
mode:
Diffstat (limited to 'dh_builddeb')
-rwxr-xr-xdh_builddeb11
1 files changed, 9 insertions, 2 deletions
diff --git a/dh_builddeb b/dh_builddeb
index 31bcdc67..dcc5af56 100755
--- a/dh_builddeb
+++ b/dh_builddeb
@@ -60,8 +60,15 @@ else {
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
if (exists $ENV{DH_ALWAYS_EXCLUDE} && length $ENV{DH_ALWAYS_EXCLUDE}) {
- complex_doit("find $tmp -name $_ | xargs rm -rf")
- foreach split(":", $ENV{DH_ALWAYS_EXCLUDE});
+ if (! compat(5)) {
+ complex_doit("find $tmp $dh{EXCLUDE_FIND} | xargs rm -rf");
+ }
+ else {
+ # Old broken code here for compatability. Does not
+ # remove everything.
+ complex_doit("find $tmp -name $_ | xargs rm -rf")
+ foreach split(":", $ENV{DH_ALWAYS_EXCLUDE});
+ }
}
if (! is_udeb($package)) {
doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME});