union: Don't traverse sub-directories only found in one element of the union.
authorLudovic Courtès <ludo@gnu.org>
Mon, 2 Sep 2013 21:03:03 +0000 (23:03 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 2 Sep 2013 21:04:25 +0000 (23:04 +0200)
commit43dd92024ab54921fbf85285d04344cb2c6e77cc
tree802ce4e8c2eab83358c0f1cd95373bd49ec76440
parent165fd9d5e628120a8355aec2d03f0b6f497d3db2
union: Don't traverse sub-directories only found in one element of the union.

This significantly reduces I/O when building profiles, especially with
lots of package-specific sub-directories (such as 'share/emacs/24.3',
'texmf', etc.)

* guix/build/union.scm (union-build)[file-tree](others-have-it?): New
  procedure.  Use it in the 'enter?' parameter of 'file-system-fold';
  change 'skip' parameter accordingly.
* tests/union.scm ("union-build"): Ensure that 'include' is a symlink
  and 'bin' is a directory.
guix/build/union.scm
tests/union.scm