Gentoo Archives: gentoo-dev

From: Brian Harring <ferringb@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] DIGESTS metadata variable for cache validation
Date: Sat, 14 Feb 2009 13:19:00
Message-Id: 20090214131850.GA13200@hrair
In Reply to: Re: [gentoo-dev] [RFC] DIGESTS metadata variable for cache validation by Zac Medico
1 On Wed, Feb 11, 2009 at 02:01:24AM -0800, Zac Medico wrote:
2 > Brian Harring wrote:
3 > > On Tue, Feb 10, 2009 at 12:55:51PM -0800, Zac Medico wrote:
4 > >> Brian Harring wrote:
5 > >>> Frankly, forget compatibility- the current format could stand to die.
6 > >>> The repository format is an ever growing mess- leave it as is and
7 > >>> work on cutting over to something sane.
8 > >> Changing the repository layout is a pretty radical thing to do.
9 > >> You're welcome to start a new subject for that if you'd like but I'd
10 > >> prefer to keep the scope of this thread focussed on the cache format
11 > >> for the existing repository layout.
12 >
13 > I don't intend to repeal the cache mtime requirement, at least
14 > (especially) not on gentoo's rsync tree. However, I wouldn't say
15 > that it's something that necessarily needs to be a requirement for
16 > other repositories or overlays, moving forward (assuming that an
17 > alternative validation framework is in place).
18
19 So... you want a subset of repositories to have cache algo x, while
20 the rest have the old algo. And since the repo w/ algo x isn't
21 marked in some fashion, all managers will have to use new algo x for
22 compatibility reasons. Right...
23
24
25 > > I reiterate, this belongs in a seperate repository format, along w/
26 > > the rest of the unversioned repository changes you've been pushing in
27 > > (profile package.mask breaking all non portage PMs is a perfect
28 > > example).
29 >
30 > The package.mask thing is a separate discussion. Let's do that in a
31 > separate thread.
32
33 Package.mask is relevant purely as a demonstration of why unversioned
34 changes to the repository formats *needs* to stop. Generally speaking
35 it's pretty shitty behaviour to embrace/extend a format when others
36 rely on it for interop.
37
38 The annoying thing about this thread is that *no where* am I saying
39 you shouldn't be free to experiment. All I'm stating is that the end
40 result isn't a compatible repo- it *is* a new format (version even)
41 thus mark it in some way so that the rest of us can start properly
42 handling it rather then having to cut last minute releases since we're
43 PMS compliant but portage treats PMS as a subset of it's format rules.
44
45 Pretty simple request, and not something that shouuld require argument
46 as far as I'm concerned.
47
48
49 > > The daft thing about this is that w/ effectively atomic sync (if the
50 > > sync fails then mark the repo as screwed up till a sync completes),
51 > > the current cache format can *still* do validation- no clue if
52 > > paludis has it, but at least pkgcore and portage can handle this via
53 > > awareness of the eclass stacking.
54 >
55 > I want to have a more fault-tolerant solution than that.
56
57 I understand your reasoning, and frankly I used to view the rsync
58 issue in the same way- it's a naive view however since it implicitly
59 is assuming that the resultant repo is *usable*, iow that the actual
60 ebuild/eclass/profile data is valid, just that the updating bailed
61 during metadata transfer. There is zero gurantee as to where the
62 rsync bailed- meaning you can be missing patches, have trashed
63 manifests, etc.
64
65 Well aware it's not friendly to require people to force a completed
66 sync before being able to use the repo, but it really is the only
67 *safe* option- as such the fault tolerant counterarg is a non
68 arguement.
69
70
71 > > Note that proper PM implementations *still* have to set the cache
72 > > entries mtime for backwards compatibility w/ older PMs that don't
73 > > support this new unversioned change thus muddying the implementation
74 > > even further.
75 >
76 > As said above, I wasn't intending that, at least (especially) not
77 > for gentoo's rsync tree. I guess you got that idea from the mention
78 > of bug 139134, but you don't need to worry about it.
79
80 Implicitly it's required; if pkgcore is to generate cache entries for
81 repo x, it has to do exactly as I said so that any any pre
82 cache-modified-managers are still able to use the cache. That's
83 assuming the $PM cares about compatibility...
84
85 ~harring

Replies