Jason A. Donenfeld wrote: > On Thu, May 10, 2012 at 3:12 PM, Wouter van Kesteren > <[email protected]> wrote: >> We have bash: >> http://git.exherbo.org/arbor.git/tree/packages/app- shells/bash/bash.exlib#n29 >> And vim: >> http://git.exherbo.org/arbor.git/tree/packages/app- editors/exlibs/vim.exlib#n100 > > That patch situation looks terrible; sorry anyone has to deal with > that ever. In any case, I see two solutions for this: > > 1) Directory based checksums, as I recommended above. If all the files > are downloaded into a directory, the contents of that directory are > concatenated and then hashed. That way it could be computed in an easy > one liner by the developer. > > 2) Regex based checksums: perhaps not as simple, but you could define > a certain filename regex, and files matching that get concatenated and > hashed. This isn't as nice as (1) but it avoids the need to create > distfile directories, if that's a motivation.
Neither of these will actually solve it. Concatenation is Just Plain Broken for this because of optional downloads - you suggested earlier that the developer downloads all of them regardless of whether the relevant option is enabled and checksums their concatenated form. But then, when the user installs, that checksum *can't* be validated unless they *also* download all the distfiles, which completely obviates the purpose of optional downloads. Therefore, checksums *must* be per-file. (Well, you could do a checksum for each possible state of the option space, but then we get a combinatorial explosion of hashes and Ciaran starts stabbing people.) _______________________________________________ Exherbo-dev mailing list [email protected] http://lists.exherbo.org/mailman/listinfo/exherbo-dev
