<div>On an amd64 machine wouldn&#39;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.</div><div><br></div><div>Andy</div>
<br><div class="gmail_quote">On 13 September 2010 10:52, Anders F Björklund <span dir="ltr">&lt;<a href="mailto:afb@algonet.se">afb@algonet.se</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Richard Hughes wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
At the moment, we define the &#39;native&#39; filter as &quot;only return packages<br>
in the computer native architecture&quot; -- this ensures that users don&#39;t<br>
&quot;find&quot; i386 packages on x64 and download a *ton* of library deps just<br>
to install them.<br>
<br>
This resulted in a RHEL bug, where users on x64 were searching for<br>
acroread and the binary flash player and getting no results. It was<br>
suggested we change the semantics to be: &quot;only return packages in the<br>
computer native architecture when a native architecture package<br>
exists&quot;<br>
</blockquote>
<br></div>
Like: if the arch (&quot;native&quot;) filter doesn&#39;t return any results, then<br>
try again and refilter using some other ad-hoc criteria instead... ?<br>
<br>
    def _samearch(self, arch1, arch2):<br>
        if arch1 == arch2:<br>
            return True<br>
        if arch1 == &#39;noarch&#39; or arch2 == &#39;noarch&#39;:<br>
            return True<br>
        x86 = re.compile(r&#39;i[3456]86&#39;)<br>
        if x86.search(arch1) and x86.search(arch2):<br>
            return True<br>
        # &lt;--- new custom logic would go here<br>
        return False<br>
<br>
<br>
Would this be done on the frontend/client, or is it something for<br>
backends to worry about. Does it apply to other searches as well ?<br>
<br>
&quot;No free software found, trying with non-free too&quot;. (and so on)<br>
<br>
<br>
It&#39;s doable when package names match. It&#39;s worse when they don&#39;t.<br>
(that would be for the &quot;native architecture package exist&quot; thing)<br>
<br>
Some packages are renamed, like with a &quot;32&quot; or &quot;64&quot; suffix or so.<br>
So it would need some heuristics like that, for the extra search.<br><font color="#888888">
<br>
--anders</font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
PackageKit mailing list<br>
<a href="mailto:PackageKit@lists.freedesktop.org" target="_blank">PackageKit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/packagekit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/packagekit</a><br>
</div></div></blockquote></div><br>