Don't show "Size of files: 0 kB" in emerge --search output for installed
authorZac Medico <zmedico@gentoo.org>
Fri, 21 Dec 2007 07:16:24 +0000 (07:16 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 21 Dec 2007 07:16:24 +0000 (07:16 -0000)
packages that have no available ebuild in the tree.

svn path=/main/trunk/; revision=9028

pym/_emerge/__init__.py

index e50c4891878a48cb94cb192e58e118a87a843bf5..d5838de23078f42c5bbdb9bbfd5aa6f8546a218d 100644 (file)
@@ -429,6 +429,7 @@ class search(object):
                        self._dbs.append(bindb)
 
                self._dbs.append(vardb)
+               self._portdb = portdb
 
        def _cp_all(self):
                cp_all = set()
@@ -446,6 +447,12 @@ class search(object):
 
        def _findname(self, *args, **kwargs):
                for db in self._dbs:
+                       if db is not self._portdb:
+                               # We don't want findname to return anything
+                               # unless it's an ebuild in a portage tree.
+                               # Otherwise, it's already built and we don't
+                               # care about it.
+                               continue
                        func = getattr(db, "findname", None)
                        if func:
                                value = func(*args, **kwargs)