In pre8 and earlier, you could say this: equery b /lib/libfoo.so /usr/lib/libbar.so /etc/blah.conf and get as output the three packages that owned those files. As of pre9, this gives nothing. This was very useful, because startup and scan overhead for equery is very big, so running that as three queries would almost triple the run time. I've tracked down the change that caused this to this hunk: --- equery 2005-11-04 15:33:31.000000000 -0500 +++ /usr/bin/equery 2005-11-04 15:36:18.000000000 -0500 @@ -324,9 +324,9 @@ if opts["fullRegex"]: rx = re.compile(q) elif len(q) and q[0] == "/": - rx = re.compile("^" + q + "$") + rx = re.compile("^" + re.escape(q) + "$") else: - rx = re.compile("/" + q + "$") + rx = re.compile("/" + re.escape(q) + "$") except: die(2, "The query '" + pp.regexpquery(q) + "' does not appear to be a valid regular expression") Reverting that from pre9 fixes the problem. Among other things, this breaks the scripts used for getting modular X dependencies.
Technically that behavior was a bug, but I do see your point. I'll look into reverting the fix.
With gentoolkit-0.2.1_pre9, equery b -f /lib/libfoo.so /usr/lib/libbar.so /etc/blah.conf will give the desired results
Created attachment 72145 [details, diff] equery.111501.patch Okay, my comment about the previous behavior being a bug was incorrect. (I should have read the code instead of man and help) Anyhow, that whole section was actually broken in previous versions as well. Please test this patch against gentoolkit-0.2.1_pre9 and verify that it resolves your problems. If you have the time please throw some other things at it as well. Try the -f option for using a regular expressions, giving it bare file names, etc. If it meets your needs, I will push out a new release.
Created attachment 72146 [details, diff] patch Related bug: with _pre8: $ equery b /lib/libncurses.so /lib/libncursesw.so [ Searching for file(s) /lib/libncurses.so,/lib/libncursesw.so in *... ] sys-libs/ncurses-5.5 (/lib/libncurses.so -> libncurses.so.5) sys-libs/ncurses-5.5 (/lib/libncursesw.so -> libncursesw.so.5) sys-libs/ncurses-5.5 (/usr/lib/libncursesw.so) sys-libs/ncurses-5.5 (/lib/libncurses.so.5 -> libncurses.so.5.5) sys-libs/ncurses-5.5 (/lib/libncurses.so.5.5) Those last three files shouldn't be listed. It's because equery searches for ^/lib/libncurses\.so|/lib/libncursesw\.so$, but that's interpreted as (^/lib/libncurses\.so)|(/lib/libncursesw\.so$), instead of ^(/lib/libncurses\.so|/lib/libncursesw\.so)$ This patch (against _pre9) should make equery b file1 file2 search for file1 and file2, and only for file1 and file2; does it look right?
Er... didn't bugzilla have a feature where it would warn when changes were made to a bug since the page was loaded? I didn't get any such warning... Seems you fixed it already :)
(In reply to comment #4) > This patch (against _pre9) should make equery b file1 file2 search for file1 > and file2, and only for file1 and file2; does it look right? I actually prefer your patch as it is more elegant and will use it instead.
Works great, thanks. I wouldn't have hit that other bug, because I was giving full paths to expanded .so files.
Fixed in gentoolkit-0.2.1_pre10