Gentoo Archives: gentoo-portage-dev

From: Douglas Anderson <dja@××××××.com>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] equery: deprecate --category filtering in belongs
Date: Sun, 08 Feb 2009 05:07:11
Message-Id: efeb8d230902072107x4d88c029y64c1573219bd59c6@mail.gmail.com
1 Hi, does anyone use --category filtering in equery belongs? I want to
2 get rid of it, or at least deprecate it. My reasoning:
3
4 * We use 'equery belongs' when don't know to what package a file
5 belongs. Even if we have a suspicion, most users would have to look up
6 the category of the package before typing it in.
7 * Even if you happen to know the exact category of the package that
8 installed the file (why are you using belongs?), typing
9 --category=app-portage takes more time than is saved by filtering by
10 category (about 5 seconds more by my unscientific test).
11
12 Even in a script setting, I see no use for this. The time saved is minuscule:
13
14 $ time equery belongs /usr/bin/equery --category app-portage
15 [ Searching for file(s) /usr/bin/equery in app-portage... ]
16 app-portage/gentoolkit-0.2.4.2-r1 (/usr/bin/equery)
17
18 real 0m4.002s
19 user 0m3.680s
20 sys 0m0.076s
21 $ time equery belongs /usr/bin/equery
22 [ Searching for file(s) /usr/bin/equery in *... ]
23 app-portage/gentoolkit-0.2.4.2-r1 (/usr/bin/equery)
24
25 real 0m4.205s
26 user 0m3.738s
27 sys 0m0.102s
28
29
30 * Lastly, it's confusing. belongs takes a filename as input, but you
31 can filter by category? All other modules that take can filter by
32 category take a pkgspec.
33
34 -Doug

Replies