Quoting Johannes Schauer (2019-03-27 06:05:51)
> On Tue, 22 Jan 2019 00:44:03 +0100 Raphael Hertzog <hertzog@debian.org> wrote:
> > On Mon, 21 Jan 2019, Steve McIntyre wrote:
> > > I've just been looking at the details for sbsigntool
> > > (https://tracker.debian.org/pkg/sbsigntool) It looks like the tracker
> > > code is confused by the architecture list for sbsigntool:
> > >
> > > Architecture: any-amd64 any-i386 arm64 armhf
> > >
> > > and is just showing
> > >
> > > arch: arm64 armhf
> > >
> > > which is quite confusing!
> >
> > Yeah, the data model includes a list of architectures by source package
> > and the parsing keeps only entries which are real architectures, the
> > architecture wildcards are just not handled.
> >
> > Extract from distro_tracker/core/retrieve_data.py:
> >
> > # Convert the parsed data into corresponding model instances
> > if 'architectures' in entry:
> > # Map the list of architecture names to their objects
> > # Discards any unknown architectures.
> > entry['architectures'] = Architecture.objects.filter(
> > name__in=entry['architectures'])
> >
> > I think we don't have any code in the tracker to handle architecture wildcard
> > and try to do any mapping or expansion. Given the data model, that's we should
> > aim to do here. Creating all the possible wildcards would be wrong, instead we
> > want to process the list of architectures that the tracker knows of and see
> > whether it matches the wildcards listed in the source package field.
>
> Feel free to use this Debian architecture wildcard matching implementation:
>
> https://gitlab.mister-muffin.de/josch/debarchwildcardtest/blob/master/debarch.py
>
> In my opinion this code should really live in python-debian but hasn't been
> put there yet (#771058).
starting with python3-debian 0.1.45 you can do this:
from debian.debian_support import DpkgArchTable
arch_table = DpkgArchTable.load_arch_table()
print(arch_table.matches_architecture("amd64", "linux-any"))
if tracker is running on stable, then maybe this bug can be fixed after the
bookworm release?
Thanks!
cheers, joschAttachment:
signature.asc
Description: signature