Bug#875306: python-debian: include a type for buildinfo files

Stuart Prescott stuart at debian.org
Wed Oct 28 08:05:43 GMT 2020


Hi Holger

Thanks for having a look and suggesting that additional extension!

On Wednesday, 28 October 2020 06:58:55 AEDT Holger Levsen wrote:
> I believe there is a third place: changelog stanzas (aka
> Binary-Only-Changes:) from binNMUs, like the one from
> https://buildinfos.debian.net/ftp-master.debian.org/buildinfo/2020/10/27/dql
> ite_1.6.0-1+b1_amd64.buildinfo
> 
> Binary-Only-Changes:
>  dqlite (1.6.0-1+b1) sid; urgency=low, binary-only=yes
>  .
>    * Binary-only non-maintainer upload for amd64; no source changes.
>    * Rebuild on buildd
>  .
>   -- amd64 Build Daemon (x86-grnet-01)
> <buildd_amd64-x86-grnet-01 at buildd.debian.org>  Tue, 27 Oct 2020 16:00:36
> +0000

ah, I'd not seen one of these in action. I should go find some additional buildinfo files to 
play with.

Something like:

In [1]: from debian import deb822
In [2]: info = deb822.BuildInfo(open("debian/tests/test_BuildInfo"))
In [3]: changes = info.get_changelog()

where changes is a debian.changelog.ChangeLog object containing 1 ChangeBlock. 

https://python-debian-team.pages.debian.net/python-debian/api/
debian.changelog.html#debian.changelog.Changelog

Thinking about the steps:

* If there is no Binary-Only-Changes field, it would just return None

* It would first remove the initial space indent and dots, raising a ValueError if they 
weren't there.

* Creating the ChangeBlock object might raise debian.changelog.ChangelogParseError or 
debian.changelog.VersionError should the changelog be bad in some way.

Like the accessors for environment and Installed-Build-Depends, this would be a read-
only method, not providing a simple way to edit/insert the changelog into an existing 
buildinfo file.

Is that what you imagined?

cheers
Stuart


-- 
Stuart Prescott    http://www.nanonanonano.net/   stuart at nanonanonano.net
Debian Developer   http://www.debian.org/         stuart at debian.org
GPG fingerprint    90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-python-debian-maint/attachments/20201028/252f2111/attachment.html>


More information about the pkg-python-debian-maint mailing list