From: Zac Medico Date: Fri, 21 Dec 2007 07:16:24 +0000 (-0000) Subject: Don't show "Size of files: 0 kB" in emerge --search output for installed X-Git-Tag: v2.2_pre1~126 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1482e02897e78336b41d8ada7224a48ae20c6da4;p=portage.git Don't show "Size of files: 0 kB" in emerge --search output for installed packages that have no available ebuild in the tree. svn path=/main/trunk/; revision=9028 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index e50c48918..d5838de23 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -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)