1 |
Stuart Herbert wrote: |
2 |
> On Tuesday 28 October 2003 2:44 pm, Andrew Gaffney wrote: |
3 |
> |
4 |
>>Is there a way to determine how long it takes 'emerge' to parse an ebuild |
5 |
>>and figure out what packages it is dependent on according to USE flags? I |
6 |
>>wrote a Perl program that does this and it takes 0.049 seconds to parse |
7 |
>>'/usr/portagemedia-video/mplayer/mplayer-1.0_pre2.ebuild' and tell me what |
8 |
>>the dependencies are with the current USE flags. I want to compare it to |
9 |
>>how fast Portage does this on my particular setup to get an acurate |
10 |
>>comparison. |
11 |
> |
12 |
> |
13 |
> How about 'time emerge -p <package>'? |
14 |
|
15 |
While this take considerable longer than my program, it also has a lot more things to do. |
16 |
It has to parse the USE flags and determine if any of the packages mplayer depends on are |
17 |
installed or not. I was using `emerge info | grep USE` to determine the USE flags, but |
18 |
that alone took 1.5 seconds, so I switched to 'emerge info | grep USE > /tmp/emergeinfo' |
19 |
before I run the program and do `cat /tmp/emergeinfo` inside my program. Is there a |
20 |
quicker way to determine the USE flags on the fly? |
21 |
|
22 |
upstairs root # time emerge -p =media-video/mplayer-1.0_pre2 |
23 |
|
24 |
These are the packages that I would merge, in order: |
25 |
|
26 |
Calculating dependencies ...done! |
27 |
[ebuild R ] media-video/mplayer-1.0_pre2 |
28 |
|
29 |
|
30 |
real 0m1.578s |
31 |
user 0m1.487s |
32 |
sys 0m0.083s |
33 |
|
34 |
-- |
35 |
Andrew Gaffney |
36 |
|
37 |
|
38 |
-- |
39 |
gentoo-dev@g.o mailing list |