Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Cc: linux.gentoo.dev@××××××××××××.com
Subject: Re: [gentoo-dev] Six month major project on Gentoo
Date: Thu, 15 Dec 2011 16:31:39
Message-Id: 201112151130.47143.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] Six month major project on Gentoo by Rich Freeman
1 On Thursday 15 December 2011 07:43:26 Rich Freeman wrote:
2 > On Thu, Dec 15, 2011 at 12:39 AM, Nirbheek Chauhan wrote:
3 > > Nevertheless, the basic bug is about changing the distfile repository
4 > > format in such a way that a single repo can contain several distfiles
5 > > built with differing build conditions. Putting metadata in the
6 > > filename is only one way of ensuring that.
7 >
8 > Well, having the filename vary when the metadata changes is the only
9 > way of ensuring that. Putting the metadata in the filename is just
10 > one of many ways to make the filename vary.
11
12 there is more raw metadata available than fits into a filename. so that is
13 already a non-starter.
14
15 if people want to post multiple binpkgs with different metadata
16
17 > Another solution (which I can already sense the objections to), would
18 > be to content-hash the files and use that as the filename. Then use
19 > indexes to point to the files. You could use symlink indexes to point
20 > to the files so that superficially it looks the same as it does now
21 > for the last version emerged. Then people looking for a particular
22 > set of metadata could use more detailed indexes to find the right
23 > file. Portage could look for an exact match when trying to merge a
24 > binpkg since searching indexes is a trivial problem.
25
26 we already hash all the files (i.e. the CONTENTS file), so using the hash of
27 that file alone wouldn't be a bad idea. although i think that file gets
28 generated on the fly when merging the binpkg (seems like a waste to not cache
29 that in the binary package ...).
30
31 > There are countless variations on this as well - like sticking a copy
32 > of the environment for each package in a separate text file with the
33 > same base name so that it is easy to grep/search/etc.
34
35 the env is already "trivial" to extract:
36 qtbz2 -x -O bison-2.5.tbz2 | qxpak -O -x - environment.bz2 | bzgrep foo
37
38 > You can also make it more user-friendly by keeping the PF in the
39 > filename followed by the hash - like gvim-1.23-r1-723ba298d92f. In
40 > such a case you probably don't even need to index the PFs.
41
42 portage should be using the generated "Packages" index to look up actual tbz2
43 filenames, so having ${PF}-<hash>.tbz2 shouldn't be too painful.
44 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Six month major project on Gentoo Mike Frysinger <vapier@g.o>