From ba067555765ae15efc7d4b84e24f7a1876568016 Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Thu, 15 Mar 2007 03:33:44 +0000 Subject: [PATCH] Trim trailing slash from query for equery belongs command (Bug #170981) svn path=/; revision=357 --- trunk/ChangeLog | 4 ++++ trunk/src/equery/equery | 4 ++++ 2 files changed, 8 insertions(+) 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: -- 2.26.2