From 497225b07d7f05abb40e75c3dfa7e4c05109a2c6 Mon Sep 17 00:00:00 2001 From: regnat Date: Thu, 2 Sep 2021 09:57:41 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20create=20lockfiles=20with=20an?= =?UTF-8?q?=20invalid=20path=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Store paths are only allowed to contain a limited subset of the alphabet, which doesn’t include `!`. So don’t create lockfiles that contain this `!` character as that would otherwise confuse (and break) the gc. Fix #5176 --- src/libstore/build/derivation-goal.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index 876b8def0..b94accb73 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -566,7 +566,7 @@ void DerivationGoal::tryToBuild() lockFiles.insert(worker.store.Store::toRealPath(*i.second.second)); else lockFiles.insert( - worker.store.Store::toRealPath(drvPath) + "!" + i.first + worker.store.Store::toRealPath(drvPath) + "." + i.first ); } }