about summary refs log tree commit diff
path: root/scripts/nix-copy-closure.in
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-01T14·46+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-01T15·14+0200
commit1c208f2b7ef8ffb5e6d435d703dad83223a67bd6 (patch)
treec5bd6b0f980720e2fb88f134d28c0620fb20d2a8 /scripts/nix-copy-closure.in
parent50dc1f5b71f7e0e4ba628904b9a47d9f9d875b3e (diff)
Allow regular files as GC roots
If a root is a regular file, then its name must denote a store
path. For instance, the existence of the file

  /nix/var/nix/gcroots/per-user/eelco/hydra-roots/wzc3cy1wwwd6d0dgxpa77ijr1yp50s6v-libxml2-2.7.7

would cause

  /nix/store/wzc3cy1wwwd6d0dgxpa77ijr1yp50s6v-libxml2-2.7.7

to be a root.

This is useful because it involves less I/O (no need for a readlink()
call) and takes up less disk space (the symlink target typically takes
up a full disk block, while directory entries are packed more
efficiently). This is particularly important for hydra.nixos.org,
which has hundreds of thousands of roots, and where reading the roots
can take 25 minutes.
Diffstat (limited to 'scripts/nix-copy-closure.in')
0 files changed, 0 insertions, 0 deletions