From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27668 invoked by uid 1002); 27 Oct 2003 15:05:58 -0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 5462 invoked from network); 27 Oct 2003 15:05:58 -0000 Message-ID: <3F9E858D.4000207@technaut.darktalker.net> Date: Tue, 28 Oct 2003 09:04:45 -0600 From: Andrew Gaffney User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031018 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gentoo Dev References: <3F9E80C6.8020007@technaut.darktalker.net> <200310271452.38111.stuart@gentoo.org> In-Reply-To: <200310271452.38111.stuart@gentoo.org> X-Enigmail-Version: 0.76.7.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [gentoo-dev] how long does it take portage to parse an ebuild? X-Archives-Salt: dc3b64ec-a4c7-4844-b06a-b13d762a48ef X-Archives-Hash: 942c8ade69098cf77f2ae09019094a7e Stuart Herbert wrote: > 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 '? 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 -- gentoo-dev@gentoo.org mailing list