+2005-11-04 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Fix equery belongs to correctly work when passed an argument
+ list of multiple files (Bug 111501)
+
2005-11-02 Paul Varner <fuzzyray@gentoo.org>
* revdep-rebuild: Fix to work with findutils-4.2.25 (Bug 111203)
def perform(self, args):
(query, opts) = self.parseArgs(args)
+ if opts["fullRegex"]:
+ q = query
+ else:
+ q = map(lambda x: ((len(x) and x[0] == "/") and "^" or "/")
+ + re.escape(x) + "$", query)
try:
- q = string.join(query, "|")
- if opts["fullRegex"]:
- rx = re.compile(q)
- elif len(q) and q[0] == "/":
- rx = re.compile("^" + re.escape(q) + "$")
- else:
- rx = re.compile("/" + re.escape(q) + "$")
+ q = string.join(q, "|")
+ rx = re.compile(q)
except:
die(2, "The query '" + pp.regexpquery(q) + "' does not appear to be a valid regular expression")