On 2020-09-28 08:21, Christian Kastner wrote: >> On 2020-09-25 11:33, Julian Andres Klode wrote: >>> Patches to add the expose those attributes in the MetaIndex >>> bindings are of course welcome. > > So this seemed straightforward enough and I gave it a try [3], but that > didn't work unfortunately: the five new attributes are remain empty.
I traced the cause of this back to the C++ library, specifically this call [5], where debReleaseIndex (a subclass of metaIndex) is initialized without these attributes. It's not really surprising as it seems to be initialized with data from the stanzas of sources.list*, which do not contain archive, origin, etc. This is where I got lost because I'm not familiar enough with APT internals and the code base. If there is an easy way to get from a sources.list entry to the corresponding Release file data, I would appreciate any tips so that I may attempt a patch extending this. My gut says there should be, because it's being done somehow for binary packages (I just couldn't figure out how). > [3] > https://salsa.debian.org/ckk/python-apt/-/commit/1baceb007096346d96b887bef11280b2938703d6 [5] https://salsa.debian.org/apt-team/apt/-/blob/master/apt-pkg/deb/debmetaindex.cc#L1183