Don’t create lockfiles with an invalid path name

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
This commit is contained in:
regnat 2021-09-02 09:57:41 +02:00
parent c397184749
commit 497225b07d

View file

@ -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
);
}
}