deduplication: Gracefully handle ENOSPC raised by 'link' calls.
commitadb158b7396cbdcda347fa298978408e531a03fd
authorLudovic Courtès <ludo@gnu.org>
Fri, 14 Dec 2018 10:10:25 +0000 (14 11:10 +0100)
committerLudovic Courtès <ludo@gnu.org>
Fri, 14 Dec 2018 11:07:24 +0000 (14 12:07 +0100)
treefd6877e72a20840cd3962f80a89618bd08fcf04b
parentea49fbdea3bbb9b55951b7bff9d9cf768fd23161
deduplication: Gracefully handle ENOSPC raised by 'link' calls.

Reported by Andreas Enge <andreas@enge.fr>
in <https://bugs.gnu.org/33676>.

* guix/store/deduplication.scm (replace-with-link): Catch ENOSPC around
'get-temp-link'.  Do nothing when 'get-temp-link' throws ENOSPC.  Move
code to restore PARENT's permissions outside of 'catch'.
* tests/store-deduplication.scm ("deduplicate, ENOSPC"): New test.
guix/store/deduplication.scm
tests/store-deduplication.scm