From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-dev+bounces-34205-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1LVbkY-0004yJ-Qg
	for garchives@archives.gentoo.org; Sat, 07 Feb 2009 01:12:51 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id E64DBE03FC;
	Sat,  7 Feb 2009 01:12:46 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id AE9DBE03FC
	for <gentoo-dev@lists.gentoo.org>; Sat,  7 Feb 2009 01:12:46 +0000 (UTC)
Received: from [192.168.22.10] (ip68-4-152-120.oc.oc.cox.net [68.4.152.120])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTP id 10278648ED
	for <gentoo-dev@lists.gentoo.org>; Sat,  7 Feb 2009 01:12:46 +0000 (UTC)
Message-ID: <498CE022.7000106@gentoo.org>
Date: Fri, 06 Feb 2009 17:13:06 -0800
From: Zac Medico <zmedico@gentoo.org>
User-Agent: Thunderbird 2.0.0.19 (X11/20081209)
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
MIME-Version: 1.0
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev]  Re: [RFC] DIGESTS metadata variable for cache validation
References: <498758E6.5080609@gentoo.org> <gmh1fq$6pa$1@ger.gmane.org>
In-Reply-To: <gmh1fq$6pa$1@ger.gmane.org>
X-Enigmail-Version: 0.95.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Archives-Salt: 17369ace-c8c3-43c7-b087-abf498e5fd97
X-Archives-Hash: 3826f5dd8e7ac24eeb3f041dbc6acd12

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Markus Ullmann wrote:
> Zac Medico schrieb:
>> The primary reason to use a digest for cache validation instead of a
>> timestamp is that it allows the cache validation mechanism to work
>> even if the tree is distributed with a protocol that does not
>> preserve timestamps, such as git or subversion. This would make it
>> possible to distribute metadata cache directly from git and
>> subversion repositories (among others). 
> 
> So just to make sure I understand what you're after... You want to add
> some checksum to the cache file to make sure that all its other vars
> (line 1-17) are still the same even though there are timestamp issues?

Right. Portage currently uses timestamps for all metadata cache
validation, but this mechanism is not suitable for protocols that
don't preserve timestamps. In order to solve this problem, I'm
suggesting that we use digests instead of timestamps.

> Or is that checksum for the ebuild file (which is in the Manifest file
> in the ebuild dir)?

Since portions of the metadata may come from both the ebuild and its
inherited eclasses, the metadata cache needs to be validated against
both the ebuild and any eclasses that it has inherited. In order to
validate the metadata cache, the checksums contained in the cache
are compared to the current checksums of the corresponding ebuilds
and eclasses. Does that answer your question?
- --
Thanks,
Zac
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkmM4CAACgkQ/ejvha5XGaNbFwCfWJm8TcFVl49TAyn4Uet1Dm9L
FjkAoOJyfhNcvTIFDd2Zimf86ZOZIBZG
=oBYM
-----END PGP SIGNATURE-----