[elbe-devel] Elbe ignores Built-Using fields

Torben Hohn torben.hohn at linutronix.de
Thu Apr 2 13:03:36 CEST 2020


On Mon, Mar 23, 2020 at 01:48:29PM +0100, Bastian Germann wrote:
> Am 23.03.20 um 13:33 schrieb Olivier Dion:
> > On Fri, 13 Mar 2020, Bastian Germann <bage at linutronix.de> wrote:
> >> Hi,
> >>
> >> Debian Policy 7.8 [0] defines a Built-Using field that has to list
> >> packages in case of including their content. The most important
> >> application of this field is with statically linking object code from a
> >> -dev package.
> >>
> >> Elbe does not take this field into consideration for src-cdrom creation.
> >> It should do this because this field influences the complete and
> >> corresponding source code. The binary package list should be parsed for
> >> this field and the resulting packages' source packages should be added
> >> to the source package list. Note that Built-Using always comes with an
> >> exact version number for each package in its list.
> >>
> >> If you need an example for implementation, look at go-bindata.
> >>
> >> [0]: https://www.debian.org/doc/debian-policy/ch-relationships.html
> > 
> > If I understand correctly, this should be done while doing the binary
> > cdrom?  i.e. mk_binary_cdrom would somehow return a list of packages to
> > add to the source cdrom in mk_source_cdrom.  Also where does this field
> > can be found except in the *.dsc file?
> > 
> 
> The field cannot be found in the dsc files but in a binary package's
> control file, i.e.
> 
> apt-cache show go-bindata | grep Built-Using
> dpkg-deb -f go-bindata*.deb Built-Using
> 
> The packages in Built-Using are actually specified to be source package
> names. I did not check yet where to get that info in elbe. I think you
> do not need to touch mk_binary_cdrom but only mk_source_cdrom.

I have looked around. But i was unable to find this info in python-apt.
We probably have to dig deeper, to find out, how we can obtain
this information.

here is a hint:

https://apt-team.pages.debian.net/python-apt/library/apt_pkg.html#apt_pkg.TagFile

the example points at the right file.
-----------------------------------------------------------------------
with apt_pkg.TagFile('/var/lib/dpkg/status') as tagfile:
    for section in tagfile:
            print(section['Package'])
-----------------------------------------------------------------------

section['Built-Using'] should point to the right field.

This is pretty manual. and doesnt have locking, etc.
So i am not very happy with this interface. But its a start. 





> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner



More information about the elbe-devel mailing list