1 |
On Thu, Dec 15, 2011 at 12:39 AM, Nirbheek Chauhan <nirbheek@g.o> wrote: |
2 |
> Nevertheless, the basic bug is about changing the distfile repository |
3 |
> format in such a way that a single repo can contain several distfiles |
4 |
> built with differing build conditions. Putting metadata in the |
5 |
> filename is only one way of ensuring that. |
6 |
|
7 |
Well, having the filename vary when the metadata changes is the only |
8 |
way of ensuring that. Putting the metadata in the filename is just |
9 |
one of many ways to make the filename vary. |
10 |
|
11 |
Another solution (which I can already sense the objections to), would |
12 |
be to content-hash the files and use that as the filename. Then use |
13 |
indexes to point to the files. You could use symlink indexes to point |
14 |
to the files so that superficially it looks the same as it does now |
15 |
for the last version emerged. Then people looking for a particular |
16 |
set of metadata could use more detailed indexes to find the right |
17 |
file. Portage could look for an exact match when trying to merge a |
18 |
binpkg since searching indexes is a trivial problem. |
19 |
|
20 |
The indexes could be anything from text files to binary files to |
21 |
databases to a couple of directory trees full of symlinks (like |
22 |
/dev/disk/by-*). The symlinks could get tricky with all the metadata |
23 |
- it might make more sense to just keep it simple and use something |
24 |
more like a database for the full details and symlinks for the basics. |
25 |
|
26 |
There are countless variations on this as well - like sticking a copy |
27 |
of the environment for each package in a separate text file with the |
28 |
same base name so that it is easy to grep/search/etc. |
29 |
|
30 |
You can also make it more user-friendly by keeping the PF in the |
31 |
filename followed by the hash - like gvim-1.23-r1-723ba298d92f. In |
32 |
such a case you probably don't even need to index the PFs. |
33 |
|
34 |
Rich |