From ddd02e1d96ce82aef943308129c5959c5f482567 Mon Sep 17 00:00:00 2001 From: necoro <> Date: Mon, 30 Jul 2007 06:40:09 +0000 Subject: updates --- portato/backend/portage/system.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'portato/backend') diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py index 92bdf51..44ac404 100644 --- a/portato/backend/portage/system.py +++ b/portato/backend/portage/system.py @@ -92,14 +92,17 @@ class PortageSystem (SystemInterface): """Returns the function needed by all the find_all_*-functions. Returns None if no name is given. @param name: name to build the function of - @type name: string + @type name: string or RE @returns: 1. None if no name is given 2. a lambda function @rtype: function""" if name != None: - return lambda x: re.match(".*"+name+".*",x) + if isinstance(name, str): + return lambda x: re.match(".*"+name+".*",x) + else: # assume regular expression + return lambda x: name.match(x) else: return lambda x: True @@ -376,7 +379,7 @@ class PortageSystem (SystemInterface): raw_checked.append(i) bm = self.get_new_packages([i]) if not bm: - warning("Bug? No best match could be found for %s.",i) + warning("Bug? No best match could be found for '%s'. Needed by: '%s'.", i, p.get_cpv()) else: for pkg in bm: if not pkg: continue -- cgit v1.2.3-70-g09d2 amp;id=e16f1783346a090e4ea1194dcaae7f03e813f6a2'>treecommitdiff