[packagekit] 'native' search filter

Andrew Stormont andyjstormont at gmail.com
Mon Sep 13 02:57:59 PDT 2010


On an amd64 machine wouldn't it be simpler to just filter out all i386
packages that have an amd64 version?  This way any packages that only exist
in i386 form would be returned.

Andy

On 13 September 2010 10:52, Anders F Björklund <afb at algonet.se> wrote:

> Richard Hughes wrote:
>
>  At the moment, we define the 'native' filter as "only return packages
>> in the computer native architecture" -- this ensures that users don't
>> "find" i386 packages on x64 and download a *ton* of library deps just
>> to install them.
>>
>> This resulted in a RHEL bug, where users on x64 were searching for
>> acroread and the binary flash player and getting no results. It was
>> suggested we change the semantics to be: "only return packages in the
>> computer native architecture when a native architecture package
>> exists"
>>
>
> Like: if the arch ("native") filter doesn't return any results, then
> try again and refilter using some other ad-hoc criteria instead... ?
>
>    def _samearch(self, arch1, arch2):
>        if arch1 == arch2:
>            return True
>        if arch1 == 'noarch' or arch2 == 'noarch':
>            return True
>        x86 = re.compile(r'i[3456]86')
>        if x86.search(arch1) and x86.search(arch2):
>            return True
>        # <--- new custom logic would go here
>        return False
>
>
> Would this be done on the frontend/client, or is it something for
> backends to worry about. Does it apply to other searches as well ?
>
> "No free software found, trying with non-free too". (and so on)
>
>
> It's doable when package names match. It's worse when they don't.
> (that would be for the "native architecture package exist" thing)
>
> Some packages are renamed, like with a "32" or "64" suffix or so.
> So it would need some heuristics like that, for the extra search.
>
> --anders
>
>
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20100913/c770fe61/attachment-0004.htm>


More information about the PackageKit mailing list