[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#970907: SourceRecords: Please expose release attributes



Thanks for the quick reply!

On 2020-09-25 11:33, Julian Andres Klode wrote:
>> I would greatly appreciate it if you would consider exposing the origin,
>> component, archive, codename and label attributes for SourceRecords as
>> well.
> 
> They are not there in the C++ object, so they can't be exposed.

I'm completely unfamiliar with the C++ implementation, so I ask naively:
Is this something that could be somewhat easily implemented there
medium-term?

> They can be exposed in MetaIndex, the MetaIndex objects you get
> from SourceList. Each MetaIndex has a list of IndexFile objects,
> and then you presumably can match them.

> It's not clear to me if the IndexFile objects are reasonably
> comparable, but you're welcome to try that out.

I tried this with an example, and while comparing IndexFile objects to
each other failed, comparing them by their attributes succeeded.

I assume that's what you meant by the "reasonably comparable" caveat
above?

> Patches to add the expose those attributes in the MetaIndex
> bindings are of course welcome.

I can sure give it a try, but I don't have much experience with Python
bindings in general.

At first glance, it would appear that you suggest I make use of these
getters [1] in src:apt, and expose them here [2[ in src:python-apt.

Did I get that right?


[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


Reply to: