It would be nice if revdep-rebuild used egrep internally rather than plain grep, so you could use extended regular expressions for specifying the library. In particular, the openldap ebuild tells you to run revdep-rebuild for like six something different libraries, if egrep were used you could just run with --library lib(ldap|lber).* to catch all of them.
Well over a year since this was opened, no comments? Bad idea? Good idea, no time to implement? If the former, maybe somebody could flip the bug to WONTFIX and close it so it stops showing up in my list; if the latter, I'd volunteer to implement if somebody was willing to review the patch and incorporate it. Thanks...
I think it's a good idea FWTW. You can use the =~ operator in bash for ERE matching, or GNU find has an ERE option iirc, as well as grep -E of course (which is slightly different to egrep.) If you want help with making a patch, ask in #bash or #friendly-coders on irc.freenode.org, to save on bugspam, then submit it here.
(In reply to comment #1) > I'd volunteer to > implement if somebody was willing to review the patch and incorporate it. It's a good idea, just a lack of time on my part. Attach a patch here and we can move forward from there.
Created attachment 142159 [details, diff] Patch to make --library option use ERE's Here is a patch that implements the behavior.
(In reply to comment #4) > Here is a patch that implements the behavior. > Looks good to me, nice and simple. Only /possible/ issue I can see is use of `sed -r' which is a GNUism. I'm not sure how gentoo-alt handles that kind of thing wrt userland=BSD; most likely a custom PATH with GNU toolkit in, which should mean it's not an issue. Oh one thing: it won't work easily (for an end-user) with directory slashes in the search term. I'm not sure if this matters or not, I'm just mentioning it for thoroughness of review. If it does, I'd change: expr="/$SONAME_SEARCH/s/^[[:space:]]*([^[:space:]]*).*$/\1/p" to: expr="\@$SONAME_SEARCH@s/^[[:space:]]*([^[:space:]]*).*$/\1/p" ..with the caveat in the docs that @ would need to be backslash-escaped should it ever be desired to use a search term containing that char (which strikes me as unlikely. If not any other char could be used.) This is specified in POSIX.
Created attachment 218567 [details, diff] revdep-rebuild.extended-regex.patch Updated patch for current versions of revdep-rebuild. If everything tests smooth, this will go into gentoolkit-0.3.0
Downgrading from jpeg-8 to jpeg-7 and running revdep-rebuild --library=libjpeg.so.8 and a plain revdep-rebuild showed no problems. So patch committed to subversion. $ svn commit -m "Update revdep-rebuild to use extended regular expressions instead of basic regular expressions. (Bug 143498)" Sending branches/gentoolkit-0.2.4/ChangeLog Sending branches/gentoolkit-0.2.4/src/revdep-rebuild/revdep-rebuild Sending trunk/gentoolkit/ChangeLog Sending trunk/gentoolkit/bin/revdep-rebuild Transmitting file data .... Committed revision 740.
Released in gentoolkit-0.3.0_rc9 and gentoolkit-0.2.4.6
Is this actually fixed or my regexp is wrong? for example revdep-rebuild --library "libdbus-1.so.3|wtf" doesnt find anything while revdep-rebuild --library libdbus-1.so.3 does
The expression seems to be fine, however, the code needs further work to fully support the or syntax.
Created attachment 221655 [details, diff] revdep-rebuild.143498.patch Okay, this patch should fix it. I tested the following and it returned the same packages each time: revdep-rebuild --library "libdbus-1.so.3" --verbose --pretend --ignore revdep-rebuild --library "libdbus-1.so.3|wtf" --verbose --pretend --ignore revdep-rebuild --library "wtf|libdbus-1.so.3" --verbose --pretend --ignore
Fix committed to subversion. $ svn commit -m "Fix extended regular expression support in revdep-rebuild" Sending branches/gentoolkit-0.2.4/src/revdep-rebuild/revdep-rebuild Sending trunk/gentoolkit/bin/revdep-rebuild Transmitting file data .. Committed revision 747.
Released in gentoolkit-0.2.4.6-r1. It will also be included in gentoolkit-0.3.0_rc10 when that is released.
Created attachment 221691 [details, diff] revdep-rebuild.143498.patch Accidentally attached the first version of the patch which was missing a quotation mark
Released in gentoolkit-0.3.0_rc10 and gentoolkit-0.2.4.6.1