On 2020-09-25 13:39, 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 thought this might be an issue with my implementation but printf says that meta->GetOrigin(), and the other getters, all return an empty string. Is there perhaps some initialization step, beyond read_main_list(), that I have overlooked? I tried it with the following code: import apt_pkg apt_pkg.init() sl = apt_pkg.SourceList() sl.read_main_list() print(sl.files[0].dist) # worked before, works now print(sl.files[0].origin) # new: prints nothing, neither do others By the way, please consider including [4] (DEB_BUILDS_OPTIONS=nodoc), or accepting an MR if you'd like me to file one. > [1] https://sources.debian.org/src/apt/2.1.10/apt-pkg/metaindex.h/#L66 > > [2] https://sources.debian.org/src/python-apt/2.1.3/python/metaindex.cc/#L18 [3] https://salsa.debian.org/ckk/python-apt/-/commit/1baceb007096346d96b887bef11280b2938703d6 [4] https://salsa.debian.org/ckk/python-apt/-/commit/b31533bcd1c2f303fb6872cf5cddedf8d5230c31