union: Gracefully handle dangling symlinks in the input.
authorLudovic Courtès <ludo@gnu.org>
Thu, 18 May 2017 09:35:45 +0000 (11:35 +0200)
committerLudovic Courtès <ludo@gnu.org>
Thu, 18 May 2017 09:38:48 +0000 (11:38 +0200)
commit22ef06b801b284760b4ffd9587ea1a3dffd31baa
treeadb65b28be5230783c3fb20db6a65ac9f32b64ea
parent41f76ae08a7a830cdeb1eaac271d714cb58fbce3
union: Gracefully handle dangling symlinks in the input.

Fixes <http://bugs.gnu.org/26949>.
Reported by Pjotr Prins <pjotr.public12@thebird.nl>.

* guix/build/union.scm (file-is-directory?): Return #f when FILE does
not exist or is a dangling symlink.
(file=?): Pass #f as a second argument to 'stat'; return #f when both
ST1 or ST2 is #f.
* tests/profiles.scm (test-equalm): New macro.
("union vs. dangling symlink"): New test.
.dir-locals.el
guix/build/union.scm
tests/profiles.scm