Trim trailing slash from query for equery belongs command (Bug #170981)
authorfuzzyray <fuzzyray@gentoo.org>
Thu, 15 Mar 2007 03:33:44 +0000 (03:33 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Thu, 15 Mar 2007 03:33:44 +0000 (03:33 -0000)
svn path=/; revision=357

trunk/ChangeLog
trunk/src/equery/equery

index fa2f29383d9c69c356e17ca1cc54db5ce0ad486f..55bfe26fd1ba55eaadaa5b41f36f3c2050608ffe 100644 (file)
@@ -1,3 +1,7 @@
+2007-03-14 Paul Varner <fuzzyray@gentoo.org>
+       * equery: Trim trailing slash from query for equery belongs command
+       (Bug #170981)
+
 2007-03-13 Paul Varner <fuzzyray@gentoo.org>
        * revdep-rebuild: Fix bug with --package-names option not rebuilding
        packages (Bug #169761)
index bf2c0199803e1ed7474f9b0b7033ed9bc151a0da..c6ab4c9d11ba399986c5afa9292668afe4fb6ee3 100755 (executable)
@@ -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: