summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog6
-rwxr-xr-xdh_prep14
2 files changed, 13 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog
index 22ad9639..c9e329b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,9 +11,9 @@ debhelper (10.5) UNRELEASED; urgency=medium
override targets to be ignored. Thanks to Gianfranco Costamagna
for reporting it and Iain Lane for tracing it to the commit
that introduced the issue. (Closes: #863887)
- * dh_clean: Bulk delete most files and directories, which gives a
- noticable speed up for source packages building many binary
- packages.
+ * dh_clean, dh_prep: Bulk delete most files and directories, which
+ gives a noticable speed up for source packages building many
+ binary packages.
[ Iain Lane ]
* Dh_Lib: Re-add warning + exit 0 for the -i/-a shortcut that was
diff --git a/dh_prep b/dh_prep
index 80b9dd38..16f479c8 100755
--- a/dh_prep
+++ b/dh_prep
@@ -40,24 +40,30 @@ multiple times to build up a list of things to exclude.
init();
+my (@clean_files, @clean_dirs);
+
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
my $ext=pkgext($package);
- doit("rm","-f","debian/${ext}substvars")
+ push(@clean_files, "debian/${ext}substvars")
unless excludefile("debian/${ext}substvars");
# These are all debhelper temp files, and so it is safe to
# wildcard them.
complex_doit("rm -f debian/$ext*.debhelper");
- doit('rm', '-rf', "debian/.debhelper/generated/${package}/");
- doit ("rm","-rf",$tmp."/")
+ push(@clean_dirs, "debian/.debhelper/generated/${package}/");
+ push(@clean_dirs , "${tmp}/")
unless excludefile($tmp);
}
-doit('rm', '-rf', 'debian/tmp') if -x 'debian/tmp' &&
+push(@clean_dirs, 'debian/tmp') if -x 'debian/tmp' &&
! excludefile("debian/tmp");
+
+xargs(\@clean_files, 'rm', '-f', '--') if @clean_files;
+xargs(\@clean_dirs, 'rm', '-fr', '--') if @clean_dirs;
+
=head1 SEE ALSO
L<debhelper(7)>