diff options
-rw-r--r-- | Debian/Debhelper/Dh_Lib.pm | 15 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | dh_makeshlibs | 10 |
3 files changed, 21 insertions, 6 deletions
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index 2acfad9b..7120a708 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 ec619128..7eb8d616 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 66e8b961..7aa52e49 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)> |