[Nix-dev] What about getting more substitutions and reducing rebuilds?

Marc Weber marco-oweber at gmx.de
Tue Jul 15 04:30:42 CEST 2008


Yet again this idea about a hash input store directory hash database.
I've found another reason why implementing kind of database

derivation hash ||| hash computed from output path
==================================================
HD1              |||    HS1
HD1              |||    HS2 <A same hash, but different output path content (impurity)
HD2              |||    HS3
HD3              |||    HS3 <B different derivation hash, but same output path hash
                              (this happens if you add a newline to the default builder script
                                chaning the hash, but not the semantics)


might be useful:
A find impurities (such as cpu/ kernel auto detection and conditional
compilation  )

B When changing any text file in an irrelevant way after rebuilding it
once (thus registering input -> output hash) we can still use the "old"
prebuild binaries.. This will become more interesting in the future when
sharing experimental patches (eg using git/ bazaar whatsoever) such as
my $NUM_CORES patch. I'll send it to this mailinglist in the near future
after some testing so you can have a look at it and decide wether it's
worth applying to the main repo.

C You can find disk/ filesystem corruptions this way.. If you recompute
the store path hash and it differs then you might have some corrupt disk
sectors or ... This would be nice to find invalid store paths (for
whatever reason they got invalid) So it would enhance security and the
possibility to recover from problems.

Or can nix alraedy do this in some way?

Sincerly
Marc Weber



More information about the nix-dev mailing list