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

Bug#970907: SourceRecords: Please expose release attributes



On Fri, Sep 25, 2020 at 11:18:51AM +0200, Christian Kastner wrote:
> Package: python3-apt
> Version: 2.1.3
> Severity: wishlist
> 
> For binary packages, it's possible to determine the releases a package
> is in, together with its versions, etc. Based on the example from [1]:
> 
>   (1) a package exposes "version_list"
>   (2)   a version exposes "file_list"
>   (3)     a file as origin, component, archive, etc. attributes.
> 
> So for a given package "foo", it's possible to differentiate between a
> origin="Debian" and origin!="Debian" package, or which release for that
> matter.
> 
> 
> SourceRecords do not have this capability. They expose "files" and
> "index" attributes, but it does not look like these can be used to
> determine which releases these source packages are part of.
> 
> So given a source package name, it's currently not possible to determine
> whether this is origin="Debian", or even which release this source is a
> part of (and in particular, which version it has in that particular
> release).
> 
> 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.

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.

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

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

-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en


Reply to: