From b4ad930ad2d7f9d94e9cc3395e6f000c4094886e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 30 Jan 2014 15:01:07 -0400 Subject: dh_makeshlibs: Defer propigating dpkg-gensymbols error until all packages have been processed. Closes: #736640 --- Debian/Debhelper/Dh_Lib.pm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'Debian/Debhelper/Dh_Lib.pm') 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) } } -- cgit v1.2.3