On Sun, 12 May 2024 23:10:14 +0200 Johannes Schauer Marin Rodrigues wrote:

[...]
> Quoting Francesco Poli (wintermute) (2024-05-12 21:06:24)
[...]
> > Please note that my current setup with pbuilder does not have this issue:
> > pdebuild generates a .changes file with 'Distribution: UNRELEASED'
> > and with the latest changelog entry correctly quoted (with 'UNRELEASED'
> > after the version number parenthesis), and hence lintian is happy...
> 
> Wait... how is Lintian happy with UNRELEASED as the changelog entry?

After digging Lintian code for a while (sorry, my Perl knowledge is
just a smattering, and it is also a bit rusty at the time of writing!),
I found the following [code]

    # issue only when not mentioned in the Distribution field
    if ((any { $_ eq 'UNRELEASED' } @changesdists)
        && none { $_ eq 'UNRELEASED' } @distributions) {
        $self->hint('unreleased-changes');
        return;
    }

[code]: 
<https://salsa.debian.org/lintian/lintian/-/blob/69b9209b02ab1a9e2d40d83931541ab6629f9226/lib/Lintian/Check/Fields/Distribution.pm#L135>

It seems to me that the 'unreleased-changes' tag is issued, if the
distribution found in the Changes field is 'UNRELEASED' and the
distribution found in the Distribution field is not 'UNRELEASED'.
Or am I completely off-track?

[...]
> The only difference between sbuild and pbuilder should be this:
> 
> >   W: $PKG_NAME: changelog-distribution-does-not-match-changes-file 
> > unreleased != unstable [usr/share/doc/$PKG_NAME/changelog.gz:1]
> 
> The reason for that difference is, that sbuild-qemu calls sbuild with the -d
> option and that overwrites the distribution field. Christian, why does
> sbuild-qemu use the -d option?
> 
> But this lintian error should also be present with pbuilder:
> 
> >   E: $PKG_NAME changes: unreleased-changes
> 
> Can you clarify?

I checked by running lintian again on the .changes file generated by
pdebuild:

  $ lintian ${PKG_NAME}_${VERSION}_${ARCH}.changes
  
  $ lintian -EviIL +pedantic ${PKG_NAME}_${VERSION}_${ARCH}.changes

These commands produce no output.

Assuming the above analysis of what the Perl code of Lintian actually
does is correct, it seems the reason is that both Distribution and
Changes have 'UNRELEASED' as distribution:

  $ grep UNRELEASED ${PKG_NAME}_${VERSION}_${ARCH}.changes
  Distribution: UNRELEASED
   $PKG_NAME ($VERSION) UNRELEASED; urgency=medium


-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

Attachment: pgpEAWsli8qCJ.pgp
Description: PGP signature

Reply via email to