I was annoyed because qpkg -g x11-libs gtk+ was not any faster than leaving the -g switch out, so I checked the code and changed the "find"-calls to take the group into account if given. Although I substituted a call to "grep ${group}" with globbing, I think this is save since a group of "x11*" is interpreted as a filename glob anyways if the -f query method is used (line 295: "dirs=`ls /var/db/pkg/${group}/*/CONTENTS"). The (short) patch follows. Reproducible: Always Steps to Reproduce: Enter "qpkg -g x11-libs" Actual Results: The command finishes after quite some HD-trashing.. ;-) Expected Results: It should be a lot faster than "qpkg |grep x11-libs", and is after the patching.
Created attachment 20107 [details, diff] the proposed speedup patch This patch makes "qpkg -g foo" look only in subdirs matching the foo glob.
I had been looking at the same thing. In my version, I came up with a what looks like a simpler patch. In looking at the two patches, I think that my version does the same thing with less work. I've been using it with my version of qpkg and haven't noticed any problems, but I am curious if I missed something.
Created attachment 22623 [details, diff] Alternate speedup patch
qpkg will be phased out in the future, only bugfixes will be added.