[Reproducible-builds] [debhelper] 03/33: dh_makeshlibs: Defer propigating dpkg-gensymbols error until all packages have been processed. Closes: #736640

Jérémy Bobbio lunar at moszumanska.debian.org
Fri Aug 29 04:34:57 UTC 2014


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/reproducible_builds_fixmtimes
in repository debhelper.

commit b4ad930ad2d7f9d94e9cc3395e6f000c4094886e
Author: Joey Hess <joey at kitenet.net>
Date:   Thu Jan 30 15:01:07 2014 -0400

    dh_makeshlibs: Defer propigating dpkg-gensymbols error until all packages have been processed. Closes: #736640
---
 Debian/Debhelper/Dh_Lib.pm | 15 +++++++++++----
 debian/changelog           |  2 ++
 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 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);
- at EXPORT=qw(&init &doit &complex_doit &verbose_print &error &warning &tmpdir
-	    &pkgfile &pkgext &pkgfilename &isnative &autoscript &filearray
-	    &filedoublearray &getpackages &basename &dirname &xargs %dh
+ at 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 at 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)>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/debhelper.git



More information about the Reproducible-builds mailing list