The revdep-rebuild is ridiculously slow at the fourth step "Assigning files to ebuilds" if there is nothing to rebuild. The code looks like this: cat $LLIST.3_rebuild | sed 's/^/obj /;s/$/ /' | ( cd /var/db/pkg fgrep -l -f - */*/CONTENTS ) | sed s:/CONTENTS:: > $LLIST.4_ebuilds I tried to test why and ran the following commands: root@lion pkg # pwd /var/db/pkg root@lion pkg # echo "foo foo" | /bin/sh -c "time fgrep -l -f - */*/CONTENTS" real 0m1.715s user 0m1.690s sys 0m0.030s root@lion pkg # cat /dev/null | /bin/sh -c "time fgrep -l -f - */*/CONTENTS" real 4m9.157s user 4m5.340s sys 0m0.350s My suggestion for an enhancement would go in an attachment.
Created attachment 15812 [details, diff] revdep-rebuild.patch Almost skips step 4 if there is nothing after step 3.
added to cvs, thanks for the research :)
Yes, I have been thinking about adding the same check for the same reason. Thanks for fixing. Evaluating of really */*/CONTENTS takes a long time. OT: This search has still limitation to about 5000 installed packages (exactly 128 KiB of arguments; this is the reason, why cd /var/db/pkg - it saves 11 characters per entry).