Gentoo Archives: gentoo-portage-dev

From: Douglas Anderson <dja@××××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] equery: deprecate --category filtering in belongs
Date: Sun, 08 Feb 2009 07:06:02
Message-Id: efeb8d230902072305g4dfd300fq3737050180e70f7d@mail.gmail.com
In Reply to: Re: [gentoo-portage-dev] equery: deprecate --category filtering in belongs by Brian Harring
1 On Sun, Feb 8, 2009 at 3:30 PM, Brian Harring <ferringb@×××××.com> wrote:
2 > patch attached against 0.2.4.2-r1; rough stats follow;
3 [snip]
4 > Mind you this isn't multiple runs, so the numbers are rough
5 > approximations- that said they're fairly representative.
6 >
7 > Strongly suggest y'all keep category support (although I'll keep on
8 > using pquery instead ;).
9 >
10 > Cheers,
11 > ~harring
12 >
13
14 Heh, OK I was looking at my local version of equery where category
15 filtering IS enabled while I was running tests with old equery, which
16 doesn't have it enabled. Thanks for pointing out my stupid mistake,
17 Brian. :)
18
19 We can in fact even make it go faster by filtering only cat/pkg before
20 it goes through cp_list:
21
22 - matches = portage.db["/"]["vartree"].dbapi.cpv_all()
23 + matches = gentoolkit.find_all_installed_packages(lambda x: x.startswith(cat))
24
25 But still... why? When is it useful? Clearly it has never been used up
26 until now.
27
28 So I'm still in favor of just dumping it. Seems like complete
29 superfluous fluff to me. If anyone would have any real-world use for
30 this, I'll clean it up and keep it in. Otherwise I really don't think
31 anyone will miss it (especially not Brian :) )
32
33 -Doug
34
35 P.S. I'm strictly talking about belongs here, category filtering in
36 all other modules (where it's actually useful and makes sense) is not
37 only safe but has been upgraded to take multiple categories, so you
38 can now do:
39
40 $ ./equery.py l --category=app-portage,sys-apps port
41 [ Searching for port in app-portage, sys-apps ... ]
42 * installed packages
43 [I--] [ ] app-portage/portage-utils-0.1.29 (0)
44 [I--] [ ~] sys-apps/portage-2.2_rc23 (0)

Replies

Subject Author
Re: [gentoo-portage-dev] equery: deprecate --category filtering in belongs "Michael A. Smith" <michael@××××××××.com>