summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2014-01-30 15:01:07 -0400
committerJoey Hess <joey@kitenet.net>2014-01-30 15:01:07 -0400
commitb4ad930ad2d7f9d94e9cc3395e6f000c4094886e (patch)
tree36869ca9813f57083d3c97165d0d2a5b79b5d8da
parentf7324fa4c4fd41f8727e74bc0d5ef40b624ce878 (diff)
dh_makeshlibs: Defer propigating dpkg-gensymbols error until all packages have been processed. Closes: #736640
-rw-r--r--Debian/Debhelper/Dh_Lib.pm15
-rw-r--r--debian/changelog2
-rwxr-xr-xdh_makeshlibs10
3 files changed, 21 insertions, 6 deletions
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 2acfad9..7120a70 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -10,9 +10,10 @@ use strict;
use Exporter;
use vars qw(@ISA @EXPORT %dh);
@ISA=qw(Exporter);
-@EXPORT=qw(&init &doit &complex_doit &verbose_print &error &warning &tmpdir
- &pkgfile &pkgext &pkgfilename &isnative &autoscript &filearray
- &filedoublearray &getpackages &basename &dirname &xargs %dh
+@EXPORT=qw(&init &doit &doit_noerror &complex_doit &verbose_print &error
+ &warning &tmpdir &pkgfile &pkgext &pkgfilename &isnative
+ &autoscript &filearray &filedoublearray
+ &getpackages &basename &dirname &xargs %dh
&compat &addsubstvar &delsubstvar &excludefile &package_arch
&is_udeb &udeb_filename &debhelper_script_subst &escape_shell
&inhibit_log &load_log &write_log &commit_override_log
@@ -206,16 +207,22 @@ sub escape_shell {
}
# Run a command, and display the command to stdout if verbose mode is on.
+# Throws error if command exits nonzero.
+#
# All commands that modifiy files in $TMP should be ran via this
# function.
#
# Note that this cannot handle complex commands, especially anything
# involving redirection. Use complex_doit instead.
sub doit {
+ doit_noerror(@_) || _error_exitcode(join(" ", @_));
+}
+
+sub doit_noerror {
verbose_print(escape_shell(@_));
if (! $dh{NO_ACT}) {
- system(@_) == 0 || _error_exitcode(join(" ", @_));
+ return (system(@_) == 0)
}
}
diff --git a/debian/changelog b/debian/changelog
index ec61912..7eb8d61 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ debhelper (9.20131228) UNRELEASED; urgency=medium
usemaps. Closes: #704443
* dh_installdocs: When doc dirs are symlinked make the dependency
versioned per policy. Closes: #676777
+ * dh_makeshlibs: Defer propigating dpkg-gensymbols error until
+ all packages have been processed. Closes: #736640
-- Joey Hess <joeyh@debian.org> Sat, 25 Jan 2014 15:49:45 -0400
diff --git a/dh_makeshlibs b/dh_makeshlibs
index 66e8b96..7aa52e4 100755
--- a/dh_makeshlibs
+++ b/dh_makeshlibs
@@ -129,6 +129,8 @@ init(options => {
my $objdump=cross_command("objdump");
my $multiarch=dpkg_architecture_value("DEB_HOST_MULTIARCH");
+my $ok=1;
+
foreach my $package (@{$dh{DOPACKAGES}}) {
next if is_udeb($package);
@@ -242,8 +244,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
# own search for symbols files, since that search
# is not 100% compatible with debhelper. (For example,
# this supports --ignore being used.)
- doit("dpkg-gensymbols", "-p$package", "-I$symbols",
- "-P$tmp",
+ $ok = $ok && doit_noerror("dpkg-gensymbols",
+ "-p$package", "-I$symbols", "-P$tmp",
@liblist,
@{$dh{U_PARAMS}});
if (-s "$tmp/DEBIAN/symbols" == 0) {
@@ -255,6 +257,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
}
+unless ($ok) {
+ error "failing due to earlier errors";
+}
+
=head1 SEE ALSO
L<debhelper(7)>