mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 15:02:42 +01:00
Fix build
This commit is contained in:
parent
758a3044f1
commit
84d10d248e
2 changed files with 3 additions and 3 deletions
|
|
@ -204,7 +204,7 @@ Path downloadFileCached(const string & url, bool unpack, string name)
|
||||||
Path dataFile = cacheDir + "/" + urlHash + ".info";
|
Path dataFile = cacheDir + "/" + urlHash + ".info";
|
||||||
Path fileLink = cacheDir + "/" + urlHash + "-file";
|
Path fileLink = cacheDir + "/" + urlHash + "-file";
|
||||||
|
|
||||||
PathLocks lock({fileLink}, fmt("waiting for lock on ‘%1%’...", fileLink));
|
PathLocks lock({fileLink}, (format("waiting for lock on ‘%1%’...") % fileLink).str());
|
||||||
|
|
||||||
Path storePath;
|
Path storePath;
|
||||||
|
|
||||||
|
|
@ -258,7 +258,7 @@ Path downloadFileCached(const string & url, bool unpack, string name)
|
||||||
|
|
||||||
if (unpack) {
|
if (unpack) {
|
||||||
Path unpackedLink = cacheDir + "/" + baseNameOf(storePath) + "-unpacked";
|
Path unpackedLink = cacheDir + "/" + baseNameOf(storePath) + "-unpacked";
|
||||||
PathLocks lock2({unpackedLink}, fmt("waiting for lock on ‘%1%’...", unpackedLink));
|
PathLocks lock({unpackedLink}, (format("waiting for lock on ‘%1%’...") % unpackedLink).str());
|
||||||
Path unpackedStorePath;
|
Path unpackedStorePath;
|
||||||
if (pathExists(unpackedLink)) {
|
if (pathExists(unpackedLink)) {
|
||||||
unpackedStorePath = readLink(unpackedLink);
|
unpackedStorePath = readLink(unpackedLink);
|
||||||
|
|
|
||||||
|
|
@ -432,7 +432,7 @@ void createSymlink(const Path & target, const Path & link)
|
||||||
void replaceSymlink(const Path & target, const Path & link)
|
void replaceSymlink(const Path & target, const Path & link)
|
||||||
{
|
{
|
||||||
for (unsigned int n = 0; true; n++) {
|
for (unsigned int n = 0; true; n++) {
|
||||||
Path tmp = canonPath(fmt("%s/.%d_%s", dirOf(link), n, baseNameOf(link)));
|
Path tmp = canonPath((format("%s/.%d_%s") % dirOf(link) % n % baseNameOf(link)).str());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
createSymlink(target, tmp);
|
createSymlink(target, tmp);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue