Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32543 - PATCH: speedup for "qpkg -g foo"
Summary: PATCH: speedup for "qpkg -g foo"
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-02 06:30 UTC by Hans Meine
Modified: 2004-02-16 06:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
the proposed speedup patch (qpkg-fast_on_groups.diff,1.08 KB, patch)
2003-11-02 06:32 UTC, Hans Meine
Details | Diff
Alternate speedup patch (qpkg.patch.3,1005 bytes, patch)
2003-12-24 08:37 UTC, Paul Varner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Meine 2003-11-02 06:30:20 UTC
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.
Comment 1 Hans Meine 2003-11-02 06:32:01 UTC
Created attachment 20107 [details, diff]
the proposed speedup patch

This patch makes "qpkg -g foo" look only in subdirs matching the foo glob.
Comment 2 Paul Varner (RETIRED) gentoo-dev 2003-12-24 08:35:32 UTC
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.
Comment 3 Paul Varner (RETIRED) gentoo-dev 2003-12-24 08:37:27 UTC
Created attachment 22623 [details, diff]
Alternate speedup patch
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2004-02-16 06:19:05 UTC
qpkg will be phased out in the future, only bugfixes will be added.