From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10301 invoked from network); 1 Dec 2004 13:37:26 +0000 Received: from smtp.gentoo.org (156.56.111.197) by lists.gentoo.org with AES256-SHA encrypted SMTP; 1 Dec 2004 13:37:26 +0000 Received: from lists.gentoo.org ([156.56.111.196] helo=parrot.gentoo.org) by smtp.gentoo.org with esmtp (Exim 4.41) id 1CZUfe-00031P-7Z for arch-gentoo-portage-dev@lists.gentoo.org; Wed, 01 Dec 2004 13:37:26 +0000 Received: (qmail 31172 invoked by uid 89); 1 Dec 2004 13:37:24 +0000 Mailing-List: contact gentoo-portage-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail Reply-To: gentoo-portage-dev@lists.gentoo.org X-BeenThere: gentoo-portage-dev@gentoo.org Received: (qmail 25076 invoked from network); 1 Dec 2004 13:37:24 +0000 From: Jason Stubbs To: gentoo-portage-dev@lists.gentoo.org Date: Wed, 1 Dec 2004 22:38:53 +0900 User-Agent: KMail/1.7.1 References: <9ef20ef3041127151046107fb5@mail.gmail.com> <1101902921.32056.129.camel@localhost.localdomain> <200412011425.25395.g.guidi@sns.it> In-Reply-To: <200412011425.25395.g.guidi@sns.it> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200412012238.53440.jstubbs@gentoo.org> Subject: Re: [gentoo-portage-dev] Current portage well designed, but badly used X-Archives-Salt: 7ad42602-d147-45c1-8456-a970cd90a343 X-Archives-Hash: 5715dc648a55eb658c04dc22316beff0 On Wednesday 01 December 2004 22:25, Gregorio Guidi wrote: > Nah, it would be something like: > - see if cache exists in /var/cache/edb (one cheap access() call) > - if it exists, validate (costly stat() calls, but 99% success) > - if it does not exists or is not valid, read cache in $portdir/metadata > and validate (stat() calls, 99% success). > - if cache is not valid, create new cache in /var/cache/edb (ebuild > sourcing: takes a lot of times). > - read cache. > > - after emerge sync, go through cache files in /var/cache/edb (usually not > many) and remove entries corresponding to deleted ebuilds. You've just described what portage does with almost perfect accuracy. Let me rearrange it for you: > - see if cache exists in /var/cache/edb (one cheap access() call) > - if it exists, validate (costly stat() calls, but 99% success) > - if cache is not valid, create new cache in /var/cache/edb (ebuild > sourcing: takes a lot of times). > - read cache. > - after emerge sync, go through cache files in /var/cache/edb (usually not > many) and remove entries corresponding to deleted ebuilds. > - if it does not exists or is not valid, read cache in $portdir/metadata > and validate (stat() calls, 99% success). If /var/cache/edb is not valid during standard emerge operation, there is almost no chance that $portdir/metadata will be valid. Please do some research before putting forth any more "new" ideas. The code is not easy to read, but is getting better. However, unless you're willing to put in the effort of deciphering it, making suggestions is by no means helpful. Regards, Jason Stubbs -- gentoo-portage-dev@gentoo.org mailing list