On Tuesday 28 October 2003 2:44 pm, Andrew Gaffney wrote:
Is there a way to determine how long it takes 'emerge' to parse an ebuild and figure out what packages it is dependent on according to USE flags? I wrote a Perl program that does this and it takes 0.049 seconds to parse '/usr/portagemedia-video/mplayer/mplayer-1.0_pre2.ebuild' and tell me what the dependencies are with the current USE flags. I want to compare it to how fast Portage does this on my particular setup to get an acurate comparison.
How about 'time emerge -p <package>'?
While this take considerable longer than my program, it also has a lot more things to do. It has to parse the USE flags and determine if any of the packages mplayer depends on are installed or not. I was using `emerge info | grep USE` to determine the USE flags, but that alone took 1.5 seconds, so I switched to 'emerge info | grep USE > /tmp/emergeinfo' before I run the program and do `cat /tmp/emergeinfo` inside my program. Is there a quicker way to determine the USE flags on the fly?
upstairs root # time emerge -p =media-video/mplayer-1.0_pre2
These are the packages that I would merge, in order:
Calculating dependencies ...done! [ebuild R ] media-video/mplayer-1.0_pre2
real 0m1.578s user 0m1.487s sys 0m0.083s
-- Andrew Gaffney
-- [EMAIL PROTECTED] mailing list
