aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-29 17:56:46 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-29 18:03:21 +0000
commit987a4a0be9978e568d736801f281791e54928ca3 (patch)
tree128c09cce15d896558eea120394379751657634b /src/libstore/build.cc
parent8d51d38e4ccf2ca0fa0b0471b32531fe287e38a4 (diff)
parent58bc3b65789a6c1216abb0dfb4f553b2a6b7f479 (diff)
Merge remote-tracking branch 'upstream/master' into hash-always-has-type
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 706f646a6..ba89230b0 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1950,8 +1950,11 @@ void linkOrCopy(const Path & from, const Path & to)
/* Hard-linking fails if we exceed the maximum link count on a
file (e.g. 32000 of ext3), which is quite possible after a
'nix-store --optimise'. FIXME: actually, why don't we just
- bind-mount in this case? */
- if (errno != EMLINK)
+ bind-mount in this case?
+
+ It can also fail with EPERM in BeegFS v7 and earlier versions
+ which don't allow hard-links to other directories */
+ if (errno != EMLINK && errno != EPERM)
throw SysError("linking '%s' to '%s'", to, from);
copyPath(from, to);
}