On Thursday 15 December 2011 07:43:26 Rich Freeman wrote: > On Thu, Dec 15, 2011 at 12:39 AM, Nirbheek Chauhan wrote: > > Nevertheless, the basic bug is about changing the distfile repository > > format in such a way that a single repo can contain several distfiles > > built with differing build conditions. Putting metadata in the > > filename is only one way of ensuring that. > > Well, having the filename vary when the metadata changes is the only > way of ensuring that. Putting the metadata in the filename is just > one of many ways to make the filename vary.
there is more raw metadata available than fits into a filename. so that is already a non-starter. if people want to post multiple binpkgs with different metadata > Another solution (which I can already sense the objections to), would > be to content-hash the files and use that as the filename. Then use > indexes to point to the files. You could use symlink indexes to point > to the files so that superficially it looks the same as it does now > for the last version emerged. Then people looking for a particular > set of metadata could use more detailed indexes to find the right > file. Portage could look for an exact match when trying to merge a > binpkg since searching indexes is a trivial problem. we already hash all the files (i.e. the CONTENTS file), so using the hash of that file alone wouldn't be a bad idea. although i think that file gets generated on the fly when merging the binpkg (seems like a waste to not cache that in the binary package ...). > There are countless variations on this as well - like sticking a copy > of the environment for each package in a separate text file with the > same base name so that it is easy to grep/search/etc. the env is already "trivial" to extract: qtbz2 -x -O bison-2.5.tbz2 | qxpak -O -x - environment.bz2 | bzgrep foo > You can also make it more user-friendly by keeping the PF in the > filename followed by the hash - like gvim-1.23-r1-723ba298d92f. In > such a case you probably don't even need to index the PFs. portage should be using the generated "Packages" index to look up actual tbz2 filenames, so having ${PF}-<hash>.tbz2 shouldn't be too painful. -mike
signature.asc
Description: This is a digitally signed message part.