revdep-rebuild (belonging to app-portage/gentoolkit) may be very long to execute - say tens of minutes to hours. I observe while it has tens or hundreds of packages to rebuild, it uses only ONE CPU, though 8 cores are available. I assume it emerges packages in sequence. Proposal : It should build one full emerge command and run it to benefit from emerge parallelisation. Counter argument & solution : if the sequence is important, revdep-rebuild will fail at some point. run something like << emerge $list -u || while ! emerge --resume --skipfirst; do :; done >> in loop until full success or a given number of trials.
The new python version of revdep-rebuild already does this. All the pkgs needing rebuild are passed to emerge in one call, so any EMERGE_DEFAULT_OPTS will be used and take advantage of any --jobs settings. It also passes any options meant for emerge that are added after a "--". eg: revdep-rebuild -- --jobs 8 To use and test it, emerge gentoolkit-9999. The original bash revdep-rebuild is also still included, but has been renamed to revdep-rebuild.sh. You will notice a significant speed improvement in the new python version :)
Good job Brian ! Thank you.
I didn't do all the work. I just directed it somewhat to ensure it was done with a usable api. The main credit goes to Slawek Lis.