On Tue, Jan 31, 2012 at 11:15:36AM +0100, Eelco Dolstra wrote:
> Hi,
> 
> On 31/01/12 08:51, Yury G. Kudryashov wrote:
> 
> >>> IHMO, this program should be run by the default builder after $out has
> >>> been set up, to remove redundancy in the generated closures.
> >>
> >> No, Nix should do that after the build has completed.  If the Nix DB were
> >> to store the cryptographic hash of every regular file in the store
> > Just create /nix/store/by-hash/first-5-digits/next-5-digits/remaining-
> > digits/number and hardlink every file to this path. Here <number> will be 0 
> > for most files, and increase only in case of file collisions.
> 
> How would that be easier than adding a table to the SQLite DB?
> 
> In particular, the existence of /nix/store/by-hash/... would prevent files 
> from
> being deleted if there are no more store paths referring to it, because the
> number of hard links would still be 1.

I think there is the chain of trust... Trusting the typical filesystem
operations at /nix/store looks to me a bit different than trusting the
filesystem *plus* the sqlite db.

I imagine that the cases of broken dbs would be noticed.

If it were an optional feature, perfect.

Regards,
Lluís.
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to