Bug#868064: dh-strip-nondeterminism: Emits noisy warning when tmpdir() is not created

Niels Thykier niels at thykier.net
Tue Jul 11 18:03:00 UTC 2017

Package: dh-strip-nondeterminism
Version: 0.035-2
Severity: minor
Tags: patch upstream


When dh_strip_nondeterminism is called, it will emit a noisy warning
about the tmpdir not existing when this is the case while still
exiting with 0 after said warning.  Example:

$ dh_strip_nondeterminism
Can't stat debian/goodbye-dh: No such file or directory
 at /usr/bin/dh_strip_nondeterminism line 71.
$ echo $?

Attached patch avoids said warning.  This may become more relevant due
to the following debhelper compat 11 change:


  * dh_auto_install will now only create the destination directory it
    needs. Previously, it would create the package build directory for
    all packages.  This will not affect packages that only build with
    debhelper commands, but it may expose bugs in commands not
    included in debhelper.

-------------- next part --------------
>From 2140384edf4831d45e2d4f1d1a0d83530f220d75 Mon Sep 17 00:00:00 2001
From: Niels Thykier <niels at thykier.net>
Date: Tue, 11 Jul 2017 17:58:35 +0000
Subject: [PATCH] dh_strip_nd: Assumes tmpdir() exists

Signed-off-by: Niels Thykier <niels at thykier.net>
 bin/dh_strip_nondeterminism | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/bin/dh_strip_nondeterminism b/bin/dh_strip_nondeterminism
index c8bb662..a363be1 100755
--- a/bin/dh_strip_nondeterminism
+++ b/bin/dh_strip_nondeterminism
@@ -67,6 +67,8 @@ File::StripNondeterminism::init();
 foreach my $package (@{$dh{DOPACKAGES}}) {
 	my $tmp=tmpdir($package);
+	next if not -d $tmp;
 	next unless @nondeterministic_files;

More information about the Reproducible-builds mailing list