Hi,

Quoting Francesco Poli (2024-05-14 00:13:31)
> > 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?

yes, this is how it works. For details see bug #542747 which is also referenced
in the description of the unreleased-changes tag. More details also here:

https://salsa.debian.org/lintian/lintian/-/commit/25be3ba45884334e7e07c7643b5e4fd4ad5a21ee#note_182777

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

> 
> [...]
> > 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
> 

What you observe is not specific to sbuild-qemu. You run into this when you use
the -d or --dist option with sbuild. As the man page describes, the option will
set the Distribution field of the produced .changes file to the specified
distribution name. This is not necessarily the same value as the top of
debian/changelog lists.

In general, you should avoid using -d or --dist with sbuild. But I see that
sbuild-qemu always adds this option to the sbuild call. I am unable to say why
it does that. Maybe Christian can clarify?

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to