I've had a chance to do some more exploration. Lintian is indeed getting run with a different .changes file than what is output to screen/disk.
The package build creates a changes file in the temporary <BUILDDIR> that contains a Distribution of UNRELEASED. This happens even if the distribution is specified with -d. The .changes file later gets written to BUILD_DIR, with the Distribution field set to what was specified by -d. However, lintian is run against the original (Dist: UNRELEASED) .changes file left in <BUILDDIR>, not the modified version written in BUILD_DIR. It seems to me that lintian should be run against the modified .changes file that is provided to the user after the build, rather than the leftover one in <BUILDDIR> that is different. Also, after the new .changes file is written, there's an attempt to delete the old one in <BUILDDIR>, but it seems to fail silently. So I assume this is a bug, rather than an intentional choice. (Also, the variables in question are very similarly named, so I think it would be an easy mistake to make). I've attached a small patch that makes it use the modified .changes file instead of the unmodified one. On my system, this makes it behave as I would expect. That is, lintian run via sbuild behaves the same way as lintian run manually, since they're now using the exact same .changes file. Best regards, Bill
diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm index f5660148..83dc295f 100644 --- a/lib/Sbuild/Build.pm +++ b/lib/Sbuild/Build.pm @@ -1684,7 +1684,7 @@ sub run_lintian { my $pipe = $session->pipe_command( { COMMAND => \@lintian_command, PRIORITY => 0, - DIR => $self->get('Build Dir'), + DIR => $self->get_conf('BUILD_DIR'), PIPE => "in" }); if (!$pipe) {