summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2013-08-15 20:14:44 +0200
committerJoey Hess <joey@kitenet.net>2013-08-15 20:21:26 +0200
commit71d06996481c6187b016c3b14b7e9faaf8adc432 (patch)
treecbdb8882f31a7348e2b039c2bb3ca3aae171ca76
parentfeb76f76e099df14be6ca5c33baf91d0a4f307a9 (diff)
dh_install, dh_installdocs, dh_clean: Fix uses of find -exec which cause it to ignore exit status of the commands run.
-rw-r--r--Debian/Debhelper/Buildsystem/python_distutils.pm2
-rw-r--r--debian/changelog3
-rwxr-xr-xdh_clean4
-rwxr-xr-xdh_install4
-rwxr-xr-xdh_installdocs2
5 files changed, 9 insertions, 6 deletions
diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm
index 4795b7c3..c3d58cc0 100644
--- a/Debian/Debhelper/Buildsystem/python_distutils.pm
+++ b/Debian/Debhelper/Buildsystem/python_distutils.pm
@@ -204,7 +204,7 @@ sub clean {
}
# The setup.py might import files, leading to python creating pyc
# files.
- $this->doit_in_sourcedir('find', '.', '-name', '*.pyc', '-exec', 'rm', '{}', ';');
+ $this->doit_in_sourcedir('find', '.', '-name', '*.pyc', '-exec', 'rm', '{}', '+');
}
1
diff --git a/debian/changelog b/debian/changelog
index c14d9762..b1f1370d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,9 @@ debhelper (9.20130631) UNRELEASED; urgency=low
a file named debian/package to be installed as the init script.
Only fixed in v10 since packages might depend on this behavior.
Closes: #719359
+ * dh_install, dh_installdocs, dh_clean: Fix uses of find -exec
+ which cause it to ignore exit status of the commands run.
+ Closes: 719598
-- Joey Hess <joeyh@debian.org> Fri, 19 Jul 2013 18:47:27 -0400
diff --git a/dh_clean b/dh_clean
index a90d51c0..931dd210 100755
--- a/dh_clean
+++ b/dh_clean
@@ -128,8 +128,8 @@ if (! $dh{D_FLAG}) {
-o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \\
-o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \\
-o -name TAGS -o \\( -path '*/.deps/*' -a -name '*.P' \\) \\
- \\) -exec rm -f {} \\; \\) -o \\
- \\( -type d -a -name autom4te.cache -prune -exec rm -rf {} \\; \\) \\)");
+ \\) -exec rm -f {} + \\) -o \\
+ \\( -type d -a -name autom4te.cache -prune -exec rm -rf {} + \\) \\)");
}
doit('rm', '-rf', 'debian/tmp') if -x 'debian/tmp' && ! compat(1) &&
diff --git a/dh_install b/dh_install
index 7a6cc61d..b89d7d1c 100755
--- a/dh_install
+++ b/dh_install
@@ -203,10 +203,10 @@ foreach my $package (getpackages()) {
my $dir = ($basename eq '.') ? $src : "$src/..";
my $pwd=`pwd`;
chomp $pwd;
- complex_doit("cd '$dir' && find '$basename' $exclude \\( -type f -or -type l \\) -exec cp --parents -dp {} $pwd/$tmp/$dest/ \\;");
+ complex_doit("cd '$dir' && find '$basename' $exclude \\( -type f -or -type l \\) -print0 | xargs -0 -I {} cp --parents -dp {} $pwd/$tmp/$dest/");
# cp is annoying so I need a separate pass
# just for empty directories
- complex_doit("cd '$dir' && find '$basename' $exclude \\( -type d -and -empty \\) -exec cp --parents -a {} $pwd/$tmp/$dest/ \\;");
+ complex_doit("cd '$dir' && find '$basename' $exclude \\( -type d -and -empty \\) -print0 | xargs -0 -I {} cp --parents -a {} $pwd/$tmp/$dest/");
}
else {
doit("cp", "-a", $src, "$tmp/$dest/");
diff --git a/dh_installdocs b/dh_installdocs
index f0b5c5e2..c516a571 100755
--- a/dh_installdocs
+++ b/dh_installdocs
@@ -213,7 +213,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
my $dir = ($basename eq '.') ? $doc : "$doc/..";
my $pwd=`pwd`;
chomp $pwd;
- complex_doit("cd '$dir' && find '$basename' \\( -type f -or -type l \\)$exclude -exec cp --parents -dp {} $pwd/$tmp/usr/share/doc/$package \\;");
+ complex_doit("cd '$dir' && find '$basename' \\( -type f -or -type l \\)$exclude -print0 | xargs -0 -I {} cp --parents -dp {} $pwd/$tmp/usr/share/doc/$package");
}
else {
doit("cp", "-a", $doc, "$tmp/usr/share/doc/$package");