From 095494f8811ee3667c82c4e2240df98558991b19 Mon Sep 17 00:00:00 2001 From: necoro <> Date: Mon, 18 Jun 2007 11:25:28 +0000 Subject: fixed the listing of the ".svn" and "CVS" dirs --- portato/backend/portage/system.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'portato/backend/portage/system.py') diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py index 7c7d57e..50224a9 100644 --- a/portato/backend/portage/system.py +++ b/portato/backend/portage/system.py @@ -21,7 +21,10 @@ from portato.backend.system_interface import SystemInterface class PortageSystem (SystemInterface): """This class provides access to the portage-system.""" - + + # pre-compile the RE removing the ".svn" and "CVS" entries + unwantedPkgsRE = re.compile(r".*(\.svn|CVS)$") + def __init__ (self): """Constructor.""" self.settings = PortageSettings() @@ -222,7 +225,8 @@ class PortageSystem (SystemInterface): t += self.settings.vartree.dbapi.cp_all() if name: t = filter(self.find_lambda(name),t) - t = unique_array(t) + + t = filter(lambda x: not self.unwantedPkgsRE.match(x), unique_array(t)) if (withVersion): t2 = [] -- cgit v1.2.3-54-g00ecf