The ebuild instructs the user to run several instances of revdep-rebuild on its previous libraries after installation, however each call to revdep-rebuild takes a very long time, at least on my fully featured system. revdep-rebuild --library liblber-2.3.so.0 revdep-rebuild --library libldap-2.3.so.0 revdep-rebuild --library libldap_r-2.3.so.0 Instead, why not use the regex capabilities of revdep-rebuild --library, thus: revdep-rebuild --library 'lib[lber|ldap|ldap_r]-2.3.so.0' Only requiring one session of indexing all system libraries and checking their reverse dependencies. Reproducible: Always Steps to Reproduce:
re-assigning since this is actually a problem in the eclass, not the ebuild.
your example regexp is incorrect as it uses lists instead of groups. i'm also not going to write something that combines multiple common strings. the revdep-rebuild regexp is also a pita as it's given directly to grep which is not called with -E to enable extended regexps. which means any groupings are going to need escapes as well as be non-standard. revdep-rebuild should be upgraded first i think to use -E in the greps.
So to help the Gentoo users in the meantime, how about the following: revdep-rebuild --library '"-E lib(lber|ldap|ldap_r)+-2.3.so.0"' No escapes, just sensible quoting. Double '-E' doesn't hurt, so it's forward compatible.
i doubt that works the way you think it does, but it might be doable
Patch to revdep-rebuild to use extended regular expressions is on Bug 143498. If it tests out okay, it will be in gentoolkit-0.3.0
Voted for this as I've often thought along these lines but my regexp knowledge was not up to it. I'm not clear if SpankY means that handling the data as an enumeration of names followed by a common version-number is the preferred way of handling the data, or the contrary, but certainly the ebuilds for openssl and openldap pass the data to the eclass in that manner. Either way would be fine as far as I can tell: the eclass certainly knows which three (or however many) files it is dealing with, and at worst you could construct a grep argument that makes a set of all three filenames end-to-end, without sub-setting. I think a lot of folks would appreciate it.
Is it really worthwhile to do this, where a 'vanilla' call to "revdep-rebuild" will catch the libraries anyway, with no cost at the evaluation stage? (on systems with multiple broken library references, people would have to rebuild for them too, but that would be a feature, not a bug). Telling people just to run "revdep-rebuild" would have the added benefit that if elog told people to run; > revdep-rebuild --library libfoo-0.2.so > rm path/libfoo-0.2.so and then for a different package > revdep-rebuild --library libbar-0.1.so > rm path/libbar-0.1.so They would instead be told to: > revdep-rebuild > rm path/libfoo-0.2.so and then for the other package > revdep-rebuild > rm path/libbar-0.1.so The canny user would run revdep-rebuild once, not twice.
(In reply to comment #7) > Is it really worthwhile to do this, where a 'vanilla' call to "revdep-rebuild" > will catch the libraries anyway, with no cost at the evaluation stage? It would only catch those libraries that are missing. If path/libfoo-0.2.so still exists (as an orphan), revdep-rebuild wont't catch it. The "efficient", but risky way of doing what you suggest would be to nuke the orphans first, then run revdep-rebuild. > rm path/libfoo-0.2.so path/libbar-0.1.so > revdep-rebuild Most of the time that story ends in a happy ending, but it's still not as safe as leaving the orphans around. Another fix would be to give revdep-rebuild orphan detection itself, by comparing the list of neededs against qfile -of <(qlist -ao) or the like. This keeps revdep-rebuild independent of any given package update, and lets them clean up orphans at their leisure. > systems with multiple broken library references, people would have to rebuild > for them too, but that would be a feature, not a bug). > > Telling people just to run "revdep-rebuild" would have the added benefit that > if elog told people to run; > > > revdep-rebuild --library libfoo-0.2.so > > rm path/libfoo-0.2.so > > and then for a different package > > > revdep-rebuild --library libbar-0.1.so > > rm path/libbar-0.1.so > > They would instead be told to: > > revdep-rebuild > > rm path/libfoo-0.2.so > and then for the other package > > revdep-rebuild > > rm path/libbar-0.1.so > > The canny user would run revdep-rebuild once, not twice.