From: fuzzyray Date: Thu, 15 Mar 2007 03:33:44 +0000 (-0000) Subject: Trim trailing slash from query for equery belongs command (Bug #170981) X-Git-Tag: gentoolkit-0.2.4.3~156 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ba067555765ae15efc7d4b84e24f7a1876568016;p=gentoolkit.git Trim trailing slash from query for equery belongs command (Bug #170981) svn path=/; revision=357 --- diff --git a/trunk/ChangeLog b/trunk/ChangeLog index fa2f293..55bfe26 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,7 @@ +2007-03-14 Paul Varner + * equery: Trim trailing slash from query for equery belongs command + (Bug #170981) + 2007-03-13 Paul Varner * revdep-rebuild: Fix bug with --package-names option not rebuilding packages (Bug #169761) diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery index bf2c019..c6ab4c9 100755 --- a/trunk/src/equery/equery +++ b/trunk/src/equery/equery @@ -359,6 +359,10 @@ class CmdListBelongs(Command): if opts["fullRegex"]: q = query else: + # Trim trailing slash from query + for i in range(0, len(query)): + if (query[i][-1] == "/"): + query[i] = query[i][:-1] q = map(lambda x: ((len(x) and x[0] == "/") and "^" or "/") + re.escape(x) + "$", query) try: