aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorGuillaume Maudoux <layus.on@gmail.com>2016-11-25 15:48:27 +0100
committerDomen Kožar <domen@dev.si>2016-11-25 15:48:27 +0100
commitf78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7 (patch)
tree23a76a33f21ce39184bcbdcd28cb937d15968ce7 /src/libstore/build.cc
parent7ee43df8622cc0589d54248fb44cebe1c1d991d2 (diff)
Get rid of unicode quotes (#1140)
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc202
1 files changed, 101 insertions, 101 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index ba51f8591..716b0933f 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -342,7 +342,7 @@ void Goal::waiteeDone(GoalPtr waitee, ExitCode result)
assert(waitees.find(waitee) != waitees.end());
waitees.erase(waitee);
- trace(format("waitee ‘%1%’ done; %2% left") %
+ trace(format("waitee '%1%' done; %2% left") %
waitee->name % waitees.size());
if (result == ecFailed || result == ecNoSubstituters || result == ecIncompleteClosure) ++nrFailed;
@@ -414,7 +414,7 @@ static void commonChildInit(Pipe & logPipe)
/* Reroute stdin to /dev/null. */
int fdDevNull = open(pathNullDevice.c_str(), O_RDWR);
if (fdDevNull == -1)
- throw SysError(format("cannot open ‘%1%’") % pathNullDevice);
+ throw SysError(format("cannot open '%1%'") % pathNullDevice);
if (dup2(fdDevNull, STDIN_FILENO) == -1)
throw SysError("cannot dup null device into stdin");
close(fdDevNull);
@@ -477,29 +477,29 @@ void UserLock::acquire()
/* Get the members of the build-users-group. */
struct group * gr = getgrnam(settings.buildUsersGroup.c_str());
if (!gr)
- throw Error(format("the group ‘%1%’ specified in ‘build-users-group’ does not exist")
+ throw Error(format("the group '%1%' specified in 'build-users-group' does not exist")
% settings.buildUsersGroup);
gid = gr->gr_gid;
/* Copy the result of getgrnam. */
Strings users;
for (char * * p = gr->gr_mem; *p; ++p) {
- debug(format("found build user ‘%1%’") % *p);
+ debug(format("found build user '%1%'") % *p);
users.push_back(*p);
}
if (users.empty())
- throw Error(format("the build users group ‘%1%’ has no members")
+ throw Error(format("the build users group '%1%' has no members")
% settings.buildUsersGroup);
/* Find a user account that isn't currently in use for another
build. */
for (auto & i : users) {
- debug(format("trying user ‘%1%’") % i);
+ debug(format("trying user '%1%'") % i);
struct passwd * pw = getpwnam(i.c_str());
if (!pw)
- throw Error(format("the user ‘%1%’ in the group ‘%2%’ does not exist")
+ throw Error(format("the user '%1%' in the group '%2%' does not exist")
% i % settings.buildUsersGroup);
createDirs(settings.nixStateDir + "/userpool");
@@ -512,7 +512,7 @@ void UserLock::acquire()
AutoCloseFD fd = open(fnUserLock.c_str(), O_RDWR | O_CREAT | O_CLOEXEC, 0600);
if (!fd)
- throw SysError(format("opening user lock ‘%1%’") % fnUserLock);
+ throw SysError(format("opening user lock '%1%'") % fnUserLock);
if (lockFile(fd.get(), ltWrite, false)) {
fdUserLock = std::move(fd);
@@ -522,7 +522,7 @@ void UserLock::acquire()
/* Sanity check... */
if (uid == getuid() || uid == geteuid())
- throw Error(format("the Nix user should not be a member of ‘%1%’")
+ throw Error(format("the Nix user should not be a member of '%1%'")
% settings.buildUsersGroup);
#if __linux__
@@ -533,7 +533,7 @@ void UserLock::acquire()
int err = getgrouplist(pw->pw_name, pw->pw_gid,
supplementaryGIDs.data(), &ngroups);
if (err == -1)
- throw Error(format("failed to get list of supplementary groups for ‘%1%’") % pw->pw_name);
+ throw Error(format("failed to get list of supplementary groups for '%1%'") % pw->pw_name);
supplementaryGIDs.resize(ngroups);
#endif
@@ -543,7 +543,7 @@ void UserLock::acquire()
}
throw Error(format("all build users are currently in use; "
- "consider creating additional users and adding them to the ‘%1%’ group")
+ "consider creating additional users and adding them to the '%1%' group")
% settings.buildUsersGroup);
}
@@ -630,7 +630,7 @@ HookInstance::HookInstance()
execv(buildHook.c_str(), stringsToCharPtrs(args).data());
- throw SysError(format("executing ‘%1%’") % buildHook);
+ throw SysError(format("executing '%1%'") % buildHook);
});
pid.setSeparatePG(true);
@@ -910,7 +910,7 @@ DerivationGoal::DerivationGoal(const Path & drvPath, const StringSet & wantedOut
, buildMode(buildMode)
{
state = &DerivationGoal::getDerivation;
- name = (format("building of ‘%1%’") % drvPath).str();
+ name = (format("building of '%1%'") % drvPath).str();
trace("created");
}
@@ -1021,7 +1021,7 @@ void DerivationGoal::loadDerivation()
trace("loading derivation");
if (nrFailed != 0) {
- printError(format("cannot build missing derivation ‘%1%’") % drvPath);
+ printError(format("cannot build missing derivation '%1%'") % drvPath);
done(BuildResult::MiscFailure);
return;
}
@@ -1062,7 +1062,7 @@ void DerivationGoal::haveDerivation()
if (drv->outputs.size() != 1 ||
drv->outputs.find("out") == drv->outputs.end() ||
drv->outputs["out"].hashAlgo == "")
- throw Error(format("cannot do a hash build of non-fixed-output derivation ‘%1%’") % drvPath);
+ throw Error(format("cannot do a hash build of non-fixed-output derivation '%1%'") % drvPath);
}
/* We are first going to try to create the invalid output paths
@@ -1084,7 +1084,7 @@ void DerivationGoal::outputsSubstituted()
trace("all outputs substituted (maybe)");
if (nrFailed > 0 && nrFailed > nrNoSubstituters + nrIncompleteClosure && !settings.tryFallback) {
- done(BuildResult::TransientFailure, (format("some substitutes for the outputs of derivation ‘%1%’ failed (usually happens due to networking issues); try ‘--fallback’ to build derivation from source ") % drvPath).str());
+ done(BuildResult::TransientFailure, (format("some substitutes for the outputs of derivation '%1%' failed (usually happens due to networking issues); try '--fallback' to build derivation from source ") % drvPath).str());
return;
}
@@ -1111,7 +1111,7 @@ void DerivationGoal::outputsSubstituted()
return;
}
if (buildMode == bmCheck && nrInvalid > 0)
- throw Error(format("some outputs of ‘%1%’ are not valid, so checking is not possible") % drvPath);
+ throw Error(format("some outputs of '%1%' are not valid, so checking is not possible") % drvPath);
/* Otherwise, at least one of the output paths could not be
produced using a substitute. So we have to build instead. */
@@ -1128,7 +1128,7 @@ void DerivationGoal::outputsSubstituted()
for (auto & i : drv->inputSrcs) {
if (worker.store.isValidPath(i)) continue;
if (!settings.useSubstitutes)
- throw Error(format("dependency of ‘%1%’ of ‘%2%’ does not exist, and substitution is disabled")
+ throw Error(format("dependency of '%1%' of '%2%' does not exist, and substitution is disabled")
% i % drvPath);
addWaitee(worker.makeSubstitutionGoal(i));
}
@@ -1175,7 +1175,7 @@ void DerivationGoal::repairClosure()
PathSet broken;
for (auto & i : outputClosure) {
if (worker.pathContentsGood(i)) continue;
- printError(format("found corrupted or missing path ‘%1%’ in the output closure of ‘%2%’") % i % drvPath);
+ printError(format("found corrupted or missing path '%1%' in the output closure of '%2%'") % i % drvPath);
Path drvPath2 = outputsToDrv[i];
if (drvPath2 == "")
addWaitee(worker.makeSubstitutionGoal(i, true));
@@ -1196,7 +1196,7 @@ void DerivationGoal::closureRepaired()
{
trace("closure repaired");
if (nrFailed > 0)
- throw Error(format("some paths in the output closure of derivation ‘%1%’ could not be repaired") % drvPath);
+ throw Error(format("some paths in the output closure of derivation '%1%' could not be repaired") % drvPath);
done(BuildResult::AlreadyValid);
}
@@ -1207,9 +1207,9 @@ void DerivationGoal::inputsRealised()
if (nrFailed != 0) {
if (!useDerivation)
- throw Error(format("some dependencies of ‘%1%’ are missing") % drvPath);
+ throw Error(format("some dependencies of '%1%' are missing") % drvPath);
printError(
- format("cannot build derivation ‘%1%’: %2% dependencies couldn't be built")
+ format("cannot build derivation '%1%': %2% dependencies couldn't be built")
% drvPath % nrFailed);
done(BuildResult::DependencyFailed);
return;
@@ -1225,7 +1225,7 @@ void DerivationGoal::inputsRealised()
/* The outputs are referenceable paths. */
for (auto & i : drv->outputs) {
- debug(format("building path ‘%1%’") % i.second.path);
+ debug(format("building path '%1%'") % i.second.path);
allPaths.insert(i.second.path);
}
@@ -1244,7 +1244,7 @@ void DerivationGoal::inputsRealised()
worker.store.computeFSClosure(inDrv.outputs[j].path, inputPaths);
else
throw Error(
- format("derivation ‘%1%’ requires non-existent output ‘%2%’ from input derivation ‘%3%’")
+ format("derivation '%1%' requires non-existent output '%2%' from input derivation '%3%'")
% drvPath % j % i.first);
}
@@ -1283,7 +1283,7 @@ void DerivationGoal::tryToBuild()
goal to sleep until another goal finishes, then try again. */
for (auto & i : drv->outputs)
if (pathIsLockedByMe(worker.store.toRealPath(i.second.path))) {
- debug(format("putting derivation ‘%1%’ to sleep because ‘%2%’ is locked by another goal")
+ debug(format("putting derivation '%1%' to sleep because '%2%' is locked by another goal")
% drvPath % i.second.path);
worker.waitForAnyGoal(shared_from_this());
return;
@@ -1312,7 +1312,7 @@ void DerivationGoal::tryToBuild()
build this derivation, so no further checks are necessary. */
validPaths = checkPathValidity(true, buildMode == bmRepair);
if (buildMode != bmCheck && validPaths.size() == drv->outputs.size()) {
- debug(format("skipping build of derivation ‘%1%’, someone beat us to it") % drvPath);
+ debug(format("skipping build of derivation '%1%', someone beat us to it") % drvPath);
outputLocks.setDeletion(true);
done(BuildResult::AlreadyValid);
return;
@@ -1327,7 +1327,7 @@ void DerivationGoal::tryToBuild()
for (auto & i : drv->outputs) {
Path path = i.second.path;
if (worker.store.isValidPath(path)) continue;
- debug(format("removing invalid path ‘%1%’") % path);
+ debug(format("removing invalid path '%1%'") % path);
deletePath(worker.store.toRealPath(path));
}
@@ -1396,7 +1396,7 @@ void replaceValidPath(const Path & storePath, const Path tmpPath)
if (pathExists(storePath))
rename(storePath.c_str(), oldPath.c_str());
if (rename(tmpPath.c_str(), storePath.c_str()) == -1)
- throw SysError(format("moving ‘%1%’ to ‘%2%’") % tmpPath % storePath);
+ throw SysError(format("moving '%1%' to '%2%'") % tmpPath % storePath);
deletePath(oldPath);
}
@@ -1416,7 +1416,7 @@ void DerivationGoal::buildDone()
child */
int status = hook ? hook->pid.wait(true) : pid.wait(true);
- debug(format("builder process for ‘%1%’ finished") % drvPath);
+ debug(format("builder process for '%1%' finished") % drvPath);
/* So the child is gone now. */
worker.childTerminated(this);
@@ -1470,7 +1470,7 @@ void DerivationGoal::buildDone()
if (pathExists(chrootRootDir + i))
rename((chrootRootDir + i).c_str(), i.c_str());
- std::string msg = (format("builder for ‘%1%’ %2%")
+ std::string msg = (format("builder for '%1%' %2%")
% drvPath % statusToString(status)).str();
if (!settings.verboseBuild && !logTail.empty()) {
@@ -1583,12 +1583,12 @@ HookReply DerivationGoal::tryBuildHook()
writeToStderr(s);
}
- debug(format("hook reply is ‘%1%’") % reply);
+ debug(format("hook reply is '%1%'") % reply);
if (reply == "decline" || reply == "postpone")
return reply == "decline" ? rpDecline : rpPostpone;
else if (reply != "accept")
- throw Error(format("bad hook reply ‘%1%’") % reply);
+ throw Error(format("bad hook reply '%1%'") % reply);
printMsg(lvlTalkative, format("using hook to build path(s) %1%") % showPaths(missingPaths));
@@ -1631,7 +1631,7 @@ HookReply DerivationGoal::tryBuildHook()
void chmod_(const Path & path, mode_t mode)
{
if (chmod(path.c_str(), mode) == -1)
- throw SysError(format("setting permissions on ‘%1%’") % path);
+ throw SysError(format("setting permissions on '%1%'") % path);
}
@@ -1655,7 +1655,7 @@ void DerivationGoal::startBuilder()
/* Right platform? */
if (!drv->canBuildLocally()) {
throw Error(
- format("a ‘%1%’ is required to build ‘%3%’, but I am a ‘%2%’")
+ format("a '%1%' is required to build '%3%', but I am a '%2%'")
% drv->platform % settings.thisSystem % drvPath);
}
@@ -1673,15 +1673,15 @@ void DerivationGoal::startBuilder()
/* deprecated alias */
settings.get("build-use-chroot", string("false")));
if (x != "true" && x != "false" && x != "relaxed")
- throw Error("option ‘build-use-sandbox’ must be set to one of ‘true’, ‘false’ or ‘relaxed’");
+ throw Error("option 'build-use-sandbox' must be set to one of 'true', 'false' or 'relaxed'");
if (x == "true") {
if (get(drv->env, "__noChroot") == "1")
- throw Error(format("derivation ‘%1%’ has ‘__noChroot’ set, "
- "but that's not allowed when ‘build-use-sandbox’ is ‘true’") % drvPath);
+ throw Error(format("derivation '%1%' has '__noChroot' set, "
+ "but that's not allowed when 'build-use-sandbox' is 'true'") % drvPath);
#if __APPLE__
if (additionalSandboxProfile != "")
- throw Error(format("derivation ‘%1%’ specifies a sandbox profile, "
- "but this is only allowed when ‘build-use-sandbox’ is ‘relaxed’") % drvPath);
+ throw Error(format("derivation '%1%' specifies a sandbox profile, "
+ "but this is only allowed when 'build-use-sandbox' is 'relaxed'") % drvPath);
#endif
useChroot = true;
}
@@ -1795,7 +1795,7 @@ void DerivationGoal::startBuilder()
string s = get(drv->env, "exportReferencesGraph");
Strings ss = tokenizeString<Strings>(s);
if (ss.size() % 2 != 0)
- throw BuildError(format("odd number of tokens in ‘exportReferencesGraph’: ‘%1%’") % s);
+ throw BuildError(format("odd number of tokens in 'exportReferencesGraph': '%1%'") % s);
for (Strings::iterator i = ss.begin(); i != ss.end(); ) {
string fileName = *i++;
checkStoreName(fileName); /* !!! abuse of this function */
@@ -1803,11 +1803,11 @@ void DerivationGoal::startBuilder()
/* Check that the store path is valid. */
Path storePath = *i++;
if (!worker.store.isInStore(storePath))
- throw BuildError(format("‘exportReferencesGraph’ contains a non-store path ‘%1%’")
+ throw BuildError(format("'exportReferencesGraph' contains a non-store path '%1%'")
% storePath);
storePath = worker.store.toStorePath(storePath);
if (!worker.store.isValidPath(storePath))
- throw BuildError(format("‘exportReferencesGraph’ contains an invalid path ‘%1%’")
+ throw BuildError(format("'exportReferencesGraph' contains an invalid path '%1%'")
% storePath);
/* If there are derivations in the graph, then include their
@@ -1846,7 +1846,7 @@ void DerivationGoal::startBuilder()
for (auto & p : filesToChown)
if (chown(p.c_str(), buildUser.getUID(), buildUser.getGID()) == -1)
- throw SysError(format("cannot change ownership of ‘%1%’") % p);
+ throw SysError(format("cannot change ownership of '%1%'") % p);
}
@@ -1893,7 +1893,7 @@ void DerivationGoal::startBuilder()
if (worker.store.isInStore(i.second.source))
worker.store.computeFSClosure(worker.store.toStorePath(i.second.source), closure);
} catch (Error & e) {
- throw Error(format("while processing ‘build-sandbox-paths’: %s") % e.what());
+ throw Error(format("while processing 'build-sandbox-paths': %s") % e.what());
}
for (auto & i : closure)
dirsInChroot[i] = i;
@@ -1919,7 +1919,7 @@ void DerivationGoal::startBuilder()
}
}
if (!found)
- throw Error(format("derivation ‘%1%’ requested impure path ‘%2%’, but it was not in allowed-impure-host-deps (‘%3%’)") % drvPath % i % allowed);
+ throw Error(format("derivation '%1%' requested impure path '%2%', but it was not in allowed-impure-host-deps ('%3%')") % drvPath % i % allowed);
dirsInChroot[i] = i;
}
@@ -1935,13 +1935,13 @@ void DerivationGoal::startBuilder()
/* Clean up the chroot directory automatically. */
autoDelChroot = std::make_shared<AutoDelete>(chrootRootDir);
- printMsg(lvlChatty, format("setting up chroot environment in ‘%1%’") % chrootRootDir);
+ printMsg(lvlChatty, format("setting up chroot environment in '%1%'") % chrootRootDir);
if (mkdir(chrootRootDir.c_str(), 0750) == -1)
- throw SysError(format("cannot create ‘%1%’") % chrootRootDir);
+ throw SysError(format("cannot create '%1%'") % chrootRootDir);
if (buildUser.enabled() && chown(chrootRootDir.c_str(), 0, buildUser.getGID()) == -1)
- throw SysError(format("cannot change ownership of ‘%1%’") % chrootRootDir);
+ throw SysError(format("cannot change ownership of '%1%'") % chrootRootDir);
/* Create a writable /tmp in the chroot. Many builders need
this. (Of course they should really respect $TMPDIR
@@ -1985,13 +1985,13 @@ void DerivationGoal::startBuilder()
chmod_(chrootStoreDir, 01775);
if (buildUser.enabled() && chown(chrootStoreDir.c_str(), 0, buildUser.getGID()) == -1)
- throw SysError(format("cannot change ownership of ‘%1%’") % chrootStoreDir);
+ throw SysError(format("cannot change ownership of '%1%'") % chrootStoreDir);
for (auto & i : inputPaths) {
Path r = worker.store.toRealPath(i);
struct stat st;
if (lstat(r.c_str(), &st))
- throw SysError(format("getting attributes of path ‘%1%’") % i);
+ throw SysError(format("getting attributes of path '%1%'") % i);
if (S_ISDIR(st.st_mode))
dirsInChroot[i] = r;
else {
@@ -2002,7 +2002,7 @@ void DerivationGoal::startBuilder()
which is quite possible after a `nix-store
--optimise'. */
if (errno != EMLINK)
- throw SysError(format("linking ‘%1%’ to ‘%2%’") % p % i);
+ throw SysError(format("linking '%1%' to '%2%'") % p % i);
StringSink sink;
dumpPath(r, sink);
StringSource source(*sink.s);
@@ -2030,7 +2030,7 @@ void DerivationGoal::startBuilder()
else {
if (pathExists(homeDir))
- throw Error(format("directory ‘%1%’ exists; please remove it") % homeDir);
+ throw Error(format("directory '%1%' exists; please remove it") % homeDir);
/* We're not doing a chroot build, but we have some valid
output paths. Since we can't just overwrite or delete
@@ -2056,7 +2056,7 @@ void DerivationGoal::startBuilder()
}
if (settings.preBuildHook != "") {
- printMsg(lvlChatty, format("executing pre-build hook ‘%1%’")
+ printMsg(lvlChatty, format("executing pre-build hook '%1%'")
% settings.preBuildHook);
auto args = useChroot ? Strings({drvPath, chrootRootDir}) :
Strings({ drvPath });
@@ -2075,7 +2075,7 @@ void DerivationGoal::startBuilder()
if (line == "extra-sandbox-paths" || line == "extra-chroot-dirs") {
state = stExtraChrootDirs;
} else {
- throw Error(format("unknown pre-build hook command ‘%1%’")
+ throw Error(format("unknown pre-build hook command '%1%'")
% line);
}
} else if (state == stExtraChrootDirs) {
@@ -2093,7 +2093,7 @@ void DerivationGoal::startBuilder()
}
/* Run the builder. */
- printMsg(lvlChatty, format("executing builder ‘%1%’") % drv->builder);
+ printMsg(lvlChatty, format("executing builder '%1%'") % drv->builder);
/* Create the log file. */
Path logFile = openLogFile();
@@ -2288,13 +2288,13 @@ void DerivationGoal::runChild()
vector<string> fields = tokenizeString<vector<string> >(i, " ");
string fs = decodeOctalEscaped(fields.at(4));
if (mount(0, fs.c_str(), 0, MS_PRIVATE, 0) == -1)
- throw SysError(format("unable to make filesystem ‘%1%’ private") % fs);
+ throw SysError(format("unable to make filesystem '%1%' private") % fs);
}
/* Bind-mount chroot directory to itself, to treat it as a
different filesystem from /, as needed for pivot_root. */
if (mount(chrootRootDir.c_str(), chrootRootDir.c_str(), 0, MS_BIND, 0) == -1)
- throw SysError(format("unable to bind mount ‘%1%’") % chrootRootDir);
+ throw SysError(format("unable to bind mount '%1%'") % chrootRootDir);
/* Set up a nearly empty /dev, unless the user asked to
bind-mount the host /dev. */
@@ -2340,12 +2340,12 @@ void DerivationGoal::runChild()
Path source = i.second.source;
Path target = chrootRootDir + i.first;
if (source == "/proc") continue; // backwards compatibility
- debug(format("bind mounting ‘%1%’ to ‘%2%’") % source % target);
+ debug(format("bind mounting '%1%' to '%2%'") % source % target);
if (stat(source.c_str(), &st) == -1) {
if (i.second.optional && errno == ENOENT)
continue;
else
- throw SysError(format("getting attributes of path ‘%1%’") % source);
+ throw SysError(format("getting attributes of path '%1%'") % source);
}
if (S_ISDIR(st.st_mode))
createDirs(target);
@@ -2354,7 +2354,7 @@ void DerivationGoal::runChild()
writeFile(target, "");
}
if (mount(source.c_str(), target.c_str(), "", MS_BIND | MS_REC, 0) == -1)
- throw SysError(format("bind mount from ‘%1%’ to ‘%2%’ failed") % source % target);
+ throw SysError(format("bind mount from '%1%' to '%2%' failed") % source % target);
}
/* Bind a new instance of procfs on /proc. */
@@ -2392,16 +2392,16 @@ void DerivationGoal::runChild()
/* Do the chroot(). */
if (chdir(chrootRootDir.c_str()) == -1)
- throw SysError(format("cannot change directory to ‘%1%’") % chrootRootDir);
+ throw SysError(format("cannot change directory to '%1%'") % chrootRootDir);
if (mkdir("real-root", 0) == -1)
throw SysError("cannot create real-root directory");
if (pivot_root(".", "real-root") == -1)
- throw SysError(format("cannot pivot old root directory onto ‘%1%’") % (chrootRootDir + "/real-root"));
+ throw SysError(format("cannot pivot old root directory onto '%1%'") % (chrootRootDir + "/real-root"));
if (chroot(".") == -1)
- throw SysError(format("cannot change root directory to ‘%1%’") % chrootRootDir);
+ throw SysError(format("cannot change root directory to '%1%'") % chrootRootDir);
if (umount2("real-root", MNT_DETACH) == -1)
throw SysError("cannot unmount real root filesystem");
@@ -2422,7 +2422,7 @@ void DerivationGoal::runChild()
#endif
if (chdir(tmpDirInSandbox.c_str()) == -1)
- throw SysError(format("changing into ‘%1%’") % tmpDir);
+ throw SysError(format("changing into '%1%'") % tmpDir);
/* Close all other file descriptors. */
closeMostFDs(set<int>());
@@ -2564,7 +2564,7 @@ void DerivationGoal::runChild()
if (lstat(path.c_str(), &st)) {
if (i.second.optional && errno == ENOENT)
continue;
- throw SysError(format("getting attributes of path ‘%1%’") % path);
+ throw SysError(format("getting attributes of path '%1%'") % path);
}
if (S_ISDIR(st.st_mode))
sandboxProfile += (format("\t(subpath \"%1%\")\n") % path).str();
@@ -2619,7 +2619,7 @@ void DerivationGoal::runChild()
if (drv->builder == "builtin:fetchurl")
builtinFetchurl(*drv);
else
- throw Error(format("unsupported builtin function ‘%1%’") % string(drv->builder, 8));
+ throw Error(format("unsupported builtin function '%1%'") % string(drv->builder, 8));
_exit(0);
} catch (std::exception & e) {
writeFull(STDERR_FILENO, "error: " + string(e.what()) + "\n");
@@ -2629,7 +2629,7 @@ void DerivationGoal::runChild()
execve(builder, stringsToCharPtrs(args).data(), stringsToCharPtrs(envStrs).data());
- throw SysError(format("executing ‘%1%’") % drv->builder);
+ throw SysError(format("executing '%1%'") % drv->builder);
} catch (std::exception & e) {
writeFull(STDERR_FILENO, "\1while setting up the build environment: " + string(e.what()) + "\n");
@@ -2651,7 +2651,7 @@ PathSet parseReferenceSpecifiers(Store & store, const BasicDerivation & drv, str
else if (drv.outputs.find(i) != drv.outputs.end())
result.insert(drv.outputs.find(i)->second.path);
else throw BuildError(
- format("derivation contains an illegal reference specifier ‘%1%’") % i);
+ format("derivation contains an illegal reference specifier '%1%'") % i);
}
return result;
}
@@ -2694,7 +2694,7 @@ void DerivationGoal::registerOutputs()
replaceValidPath(path, actualPath);
else
if (buildMode != bmCheck && rename(actualPath.c_str(), worker.store.toRealPath(path).c_str()) == -1)
- throw SysError(format("moving build output ‘%1%’ from the sandbox to the Nix store") % path);
+ throw SysError(format("moving build output '%1%' from the sandbox to the Nix store") % path);
}
if (buildMode != bmCheck) actualPath = worker.store.toRealPath(path);
} else {
@@ -2711,9 +2711,9 @@ void DerivationGoal::registerOutputs()
if (lstat(actualPath.c_str(), &st) == -1) {
if (errno == ENOENT)
throw BuildError(
- format("builder for ‘%1%’ failed to produce output path ‘%2%’")
+ format("builder for '%1%' failed to produce output path '%2%'")
% drvPath % path);
- throw SysError(format("getting attributes of path ‘%1%’") % actualPath);
+ throw SysError(format("getting attributes of path '%1%'") % actualPath);
}
#ifndef __CYGWIN__
@@ -2723,13 +2723,13 @@ void DerivationGoal::registerOutputs()
user. */
if ((!S_ISLNK(st.st_mode) && (st.st_mode & (S_IWGRP | S_IWOTH))) ||
(buildUser.enabled() && st.st_uid != buildUser.getUID()))
- throw BuildError(format("suspicious ownership or permission on ‘%1%’; rejecting this build output") % path);
+ throw BuildError(format("suspicious ownership or permission on '%1%'; rejecting this build output") % path);
#endif
/* Apply hash rewriting if necessary. */
bool rewritten = false;
if (!outputRewrites.empty()) {
- printError(format("warning: rewriting hashes in ‘%1%’; cross fingers") % path);
+ printError(format("warning: rewriting hashes in '%1%'; cross fingers") % path);
/* Canonicalise first. This ensures that the path we're
rewriting doesn't contain a hard link to /etc/shadow or
@@ -2760,7 +2760,7 @@ void DerivationGoal::registerOutputs()
execute permission. */
if (!S_ISREG(st.st_mode) || (st.st_mode & S_IXUSR) != 0)
throw BuildError(
- format("output path ‘%1%’ should be a non-executable regular file") % path);
+ format("output path '%1%' should be a non-executable regular file") % path);
}
/* Check the hash. In hash mode, move the path produced by
@@ -2768,7 +2768,7 @@ void DerivationGoal::registerOutputs()
Hash h2 = recursive ? hashPath(h.type, actualPath).first : hashFile(h.type, actualPath);
if (buildMode == bmHash) {
Path dest = worker.store.makeFixedOutputPath(recursive, h2, drv->env["name"]);
- printError(format("build produced path ‘%1%’ with %2% hash ‘%3%’")
+ printError(format("build produced path '%1%' with %2% hash '%3%'")
% dest % printHashType(h.type) % printHash16or32(h2));
if (worker.store.isValidPath(dest))
return;
@@ -2777,14 +2777,14 @@ void DerivationGoal::registerOutputs()
PathLocks outputLocks({actualDest});
deletePath(actualDest);
if (rename(actualPath.c_str(), actualDest.c_str()) == -1)
- throw SysError(format("moving ‘%1%’ to ‘%2%’") % actualPath % dest);
+ throw SysError(format("moving '%1%' to '%2%'") % actualPath % dest);
}
path = dest;
actualPath = actualDest;
} else {
if (h != h2)
throw BuildError(
- format("output path ‘%1%’ has %2% hash ‘%3%’ when ‘%4%’ was expected")
+ format("output path '%1%' has %2% hash '%3%' when '%4%' was expected")
% path % i.second.hashAlgo % printHash16or32(h2) % printHash16or32(h));
}
}
@@ -2798,7 +2798,7 @@ void DerivationGoal::registerOutputs()
contained in it. Compute the SHA-256 NAR hash at the same
time. The hash is stored in the database so that we can
verify later on whether nobody has messed with the store. */
- Activity act(*logger, lvlTalkative, format("scanning for references inside ‘%1%’") % path);
+ Activity act(*logger, lvlTalkative, format("scanning for references inside '%1%'") % path);
HashResult hash;
PathSet references = scanForReferences(actualPath, allPaths, hash);
@@ -2810,11 +2810,11 @@ void DerivationGoal::registerOutputs()
Path dst = worker.store.toRealPath(path + checkSuffix);
deletePath(dst);
if (rename(actualPath.c_str(), dst.c_str()))
- throw SysError(format("renaming ‘%1%’ to ‘%2%’") % actualPath % dst);
- throw Error(format("derivation ‘%1%’ may not be deterministic: output ‘%2%’ differs from ‘%3%’")
+ throw SysError(format("renaming '%1%' to '%2%'") % actualPath % dst);
+ throw Error(format("derivation '%1%' may not be deterministic: output '%2%' differs from '%3%'")
% drvPath % path % dst);
} else
- throw Error(format("derivation ‘%1%’ may not be deterministic: output ‘%2%’ differs")
+ throw Error(format("derivation '%1%' may not be deterministic: output '%2%' differs")
% drvPath % path);
}
@@ -2834,9 +2834,9 @@ void DerivationGoal::registerOutputs()
for (auto & i : inputPaths) {
PathSet::iterator j = references.find(i);
if (j == references.end())
- debug(format("unreferenced input: ‘%1%’") % i);
+ debug(format("unreferenced input: '%1%'") % i);
else
- debug(format("referenced input: ‘%1%’") % i);
+ debug(format("referenced input: '%1%'") % i);
}
/* Enforce `allowedReferences' and friends. */
@@ -2872,7 +2872,7 @@ void DerivationGoal::registerOutputs()
badPathsStr += "\n\t";
badPathsStr += i;
}
- throw BuildError(format("output ‘%1%’ is not allowed to refer to the following paths:%2%") % actualPath % badPathsStr);
+ throw BuildError(format("output '%1%' is not allowed to refer to the following paths:%2%") % actualPath % badPathsStr);
}
};
@@ -2909,11 +2909,11 @@ void DerivationGoal::registerOutputs()
Path prev = i->path + checkSuffix;
if (pathExists(prev))
throw NotDeterministic(
- format("output ‘%1%’ of ‘%2%’ differs from ‘%3%’ from previous round")
+ format("output '%1%' of '%2%' differs from '%3%' from previous round")
% i->path % drvPath % prev);
else
throw NotDeterministic(
- format("output ‘%1%’ of ‘%2%’ differs from previous round")
+ format("output '%1%' of '%2%' differs from previous round")
% i->path % drvPath);
}
abort(); // shouldn't happen
@@ -2926,7 +2926,7 @@ void DerivationGoal::registerOutputs()
if (curRound < nrRounds) {
Path dst = i.second.path + checkSuffix;
if (rename(i.second.path.c_str(), dst.c_str()))
- throw SysError(format("renaming ‘%1%’ to ‘%2%’") % i.second.path % dst);
+ throw SysError(format("renaming '%1%' to '%2%'") % i.second.path % dst);
}
}
@@ -2965,7 +2965,7 @@ Path DerivationGoal::openLogFile()
% (settings.compressLog ? ".bz2" : "")).str();
fdLogFile = open(logFileName.c_str(), O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC, 0666);
- if (!fdLogFile) throw SysError(format("creating log file ‘%1%’") % logFileName);
+ if (!fdLogFile) throw SysError(format("creating log file '%1%'") % logFileName);
logFileSink = std::make_shared<FdSink>(fdLogFile.get());
@@ -2993,7 +2993,7 @@ void DerivationGoal::deleteTmpDir(bool force)
if (tmpDir != "") {
if (settings.keepFailed && !force) {
printError(
- format("note: keeping build directory ‘%2%’")
+ format("note: keeping build directory '%2%'")
% drvPath % tmpDir);
chmod(tmpDir.c_str(), 0755);
}
@@ -3177,7 +3177,7 @@ SubstitutionGoal::SubstitutionGoal(const Path & storePath, Worker & worker, bool
{
this->storePath = storePath;
state = &SubstitutionGoal::init;
- name = (format("substitution of ‘%1%’") % storePath).str();
+ name = (format("substitution of '%1%'") % storePath).str();
trace("created");
}
@@ -3215,7 +3215,7 @@ void SubstitutionGoal::init()
}
if (settings.readOnlyMode)
- throw Error(format("cannot substitute path ‘%1%’ - no write access to the Nix store") % storePath);
+ throw Error(format("cannot substitute path '%1%' - no write access to the Nix store") % storePath);
subs = settings.useSubstitutes ? getDefaultSubstituters() : std::list<ref<Store>>();
@@ -3230,7 +3230,7 @@ void SubstitutionGoal::tryNext()
if (subs.size() == 0) {
/* None left. Terminate this goal and let someone else deal
with it. */
- debug(format("path ‘%1%’ is required, but there is no substituter that can build it") % storePath);
+ debug(format("path '%1%' is required, but there is no substituter that can build it") % storePath);
/* Hack: don't indicate failure if there were no substituters.
In that case the calling derivation should just do a
@@ -3261,7 +3261,7 @@ void SubstitutionGoal::tryNext()
signature. LocalStore::addToStore() also checks for this, but
only after we've downloaded the path. */
if (worker.store.requireSigs && !info->checkSignatures(worker.store, worker.store.publicKeys)) {
- printInfo(format("warning: substituter ‘%s’ does not have a valid signature for path ‘%s’")
+ printInfo(format("warning: substituter '%s' does not have a valid signature for path '%s'")
% sub->getUri() % storePath);
tryNext();
return;
@@ -3285,7 +3285,7 @@ void SubstitutionGoal::referencesValid()
trace("all references realised");
if (nrFailed > 0) {
- debug(format("some references of path ‘%1%’ could not be realised") % storePath);
+ debug(format("some references of path '%1%' could not be realised") % storePath);
amDone(nrNoSubstituters > 0 || nrIncompleteClosure > 0 ? ecIncompleteClosure : ecFailed);
return;
}
@@ -3312,7 +3312,7 @@ void SubstitutionGoal::tryToRun()
return;
}
- printInfo(format("fetching path ‘%1%’...") % storePath);
+ printInfo(format("fetching path '%1%'...") % storePath);
outPipe.create();
@@ -3359,7 +3359,7 @@ void SubstitutionGoal::finished()
worker.markContentsGood(storePath);
printMsg(lvlChatty,
- format("substitution of path ‘%1%’ succeeded") % storePath);
+ format("substitution of path '%1%' succeeded") % storePath);
amDone(ecSuccess);
}
@@ -3589,7 +3589,7 @@ void Worker::run(const Goals & _topGoals)
waitForInput();
else {
if (awake.empty() && settings.maxBuildJobs == 0) throw Error(
- "unable to start any build; either increase ‘--max-jobs’ "
+ "unable to start any build; either increase '--max-jobs' "
"or enable distributed builds");
assert(!awake.empty());
}
@@ -3744,7 +3744,7 @@ bool Worker::pathContentsGood(const Path & path)
{
std::map<Path, bool>::iterator i = pathContentsGoodCache.find(path);
if (i != pathContentsGoodCache.end()) return i->second;
- printInfo(format("checking path ‘%1%’...") % path);
+ printInfo(format("checking path '%1%'...") % path);
auto info = store.queryPathInfo(path);
bool res;
if (!pathExists(path))
@@ -3755,7 +3755,7 @@ bool Worker::pathContentsGood(const Path & path)
res = info->narHash == nullHash || info->narHash == current.first;
}
pathContentsGoodCache[path] = res;
- if (!res) printError(format("path ‘%1%’ is corrupted or missing!") % path);
+ if (!res) printError(format("path '%1%' is corrupted or missing!") % path);
return res;
}
@@ -3829,7 +3829,7 @@ void LocalStore::ensurePath(const Path & path)
worker.run(goals);
if (goal->getExitCode() != Goal::ecSuccess)
- throw Error(worker.exitStatus(), "path ‘%s’ does not exist and cannot be created", path);
+ throw Error(worker.exitStatus(), "path '%s' does not exist and cannot be created", path);
}
@@ -3850,7 +3850,7 @@ void LocalStore::repairPath(const Path & path)
goals.insert(worker.makeDerivationGoal(deriver, StringSet(), bmRepair));
worker.run(goals);
} else
- throw Error(worker.exitStatus(), "cannot repair path ‘%s’", path);
+ throw Error(worker.exitStatus(), "cannot repair path '%s'", path);
}
}