Bug#846711: git-build-recipe: FTBFS: Tests failures

Colin Watson cjwatson at debian.org
Wed Dec 7 09:14:36 UTC 2016


On Tue, Dec 06, 2016 at 10:54:21PM -0500, James McCoy wrote:
> On Tue, Dec 06, 2016 at 10:39:44AM +0000, Colin Watson wrote:
> > […]
> >   subprocess.CalledProcessError: Command '['/usr/bin/debuild', '--tgz-check', '-i', '-I', '-S', '-uc', '-us']' returned non-zero exit status 29
> >   }}}
> >   
> >   stdout: {{{
> >   dpkg-buildpackage -rfakeroot -us -uc -i -I -S --check-command=lintian
> >   dpkg-buildpackage: error: check-commmand 'lintian' not found
> >   }}}
> > […]
> > 
> > git-build-recipe doesn't do anything particular to ask debuild to run
> > lintian here, and it doesn't expect or require a lintian check.  It used
> > to be that debuild would check whether lintian was in fact installed,
> > and not run it if it wasn't; indeed, its documentation still says "then
> > runs lintian on the .changes file created (assuming that lintian is
> > installed)", thereby claiming that that's still what it does.  But this
> > was broken in devscripts 58eb4a4a5e006bf9a2589da0ef2f36aa0d81ed8c when
> > changing debuild to use dpkg-buildpackage --check-command.
> 
> Indeed.  In order to fix this, I either need to move running lintian
> back into debuild or dpkg needs to not error when the check command
> isn't present.

I don't understand why.  Wouldn't something like this (untested) be
sufficient?

diff --git a/scripts/debuild.pl b/scripts/debuild.pl
index 639bbac..afbd1dc 100755
--- a/scripts/debuild.pl
+++ b/scripts/debuild.pl
@@ -988,7 +988,7 @@ else {
     open STDOUT, ">&BUILD" or fatal "can't reopen stdout: $!";
     open STDERR, ">&BUILD" or fatal "can't reopen stderr: $!";
 
-    if ($run_lintian) {
+    if ($run_lintian and system("command -v lintian >/dev/null 2>&1") == 0) {
 	push(@dpkg_opts, '--check-command=lintian',
 	    map { "--check-option=$_" } @lintian_opts);
     }

-- 
Colin Watson                                       [cjwatson at debian.org]



More information about the devscripts-devel mailing list