diff options
Diffstat (limited to 'src/nix-env')
-rw-r--r-- | src/nix-env/nix-env.cc | 62 | ||||
-rw-r--r-- | src/nix-env/profiles.cc | 8 | ||||
-rw-r--r-- | src/nix-env/user-env.cc | 2 |
3 files changed, 36 insertions, 36 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index ad0f4bdd7105..325c8b928fea 100644 --- a/src/nix-env/nix-env.cc +++ b/src/nix-env/nix-env.cc @@ -69,7 +69,7 @@ static string needArg(Strings::iterator & i, Strings & args, const string & arg) { if (i == args.end()) throw UsageError( - format("`%1%' requires an argument") % arg); + format("‘%1%’ requires an argument") % arg); return *i++; } @@ -123,7 +123,7 @@ static void getAllExprs(EvalState & state, if (hasSuffix(attrName, ".nix")) attrName = string(attrName, 0, attrName.size() - 4); if (attrs.find(attrName) != attrs.end()) { - printMsg(lvlError, format("warning: name collision in input Nix expressions, skipping `%1%'") % path2); + printMsg(lvlError, format("warning: name collision in input Nix expressions, skipping ‘%1%’") % path2); continue; } attrs.insert(attrName); @@ -146,7 +146,7 @@ static void loadSourceExpr(EvalState & state, const Path & path, Value & v) { struct stat st; if (stat(path.c_str(), &st) == -1) - throw SysError(format("getting information about `%1%'") % path); + throw SysError(format("getting information about ‘%1%’") % path); if (isNixExpr(path, st)) { state.evalFile(path, v); @@ -232,7 +232,7 @@ static void checkSelectorUse(DrvNames & selectors) /* Check that all selectors have been used. */ foreach (DrvNames::iterator, i, selectors) if (i->hits == 0 && i->fullName != "*") - throw Error(format("selector `%1%' matches no derivations") % i->fullName); + throw Error(format("selector ‘%1%’ matches no derivations") % i->fullName); } @@ -303,7 +303,7 @@ static DrvInfos filterBySelector(EvalState & state, const DrvInfos & allElems, for (Newest::iterator j = newest.begin(); j != newest.end(); ++j) { if (multiple.find(j->second.first.name) != multiple.end()) printMsg(lvlInfo, - format("warning: there are multiple derivations named `%1%'; using the first one") + format("warning: there are multiple derivations named ‘%1%’; using the first one") % j->second.first.name); matches.push_back(j->second); } @@ -494,13 +494,13 @@ static void installDerivations(Globals & globals, if (!globals.preserveInstalled && newNames.find(drvName.name) != newNames.end() && !keep(*i)) - printMsg(lvlInfo, format("replacing old `%1%'") % i->name); + printMsg(lvlInfo, format("replacing old ‘%1%’") % i->name); else allElems.push_back(*i); } foreach (DrvInfos::iterator, i, newElems) - printMsg(lvlInfo, format("installing `%1%'") % i->name); + printMsg(lvlInfo, format("installing ‘%1%’") % i->name); } printMissing(*globals.state, newElems); @@ -522,7 +522,7 @@ static void opInstall(Globals & globals, Strings opFlags, Strings opArgs) globals.preserveInstalled = true; else if (arg == "--remove-all" || arg == "-r") globals.removeAll = true; - else throw UsageError(format("unknown flag `%1%'") % arg); + else throw UsageError(format("unknown flag ‘%1%’") % arg); } installDerivations(globals, opArgs, globals.profile); @@ -599,13 +599,13 @@ static void upgradeDerivations(Globals & globals, bestElem->queryOutPath()) { printMsg(lvlInfo, - format("upgrading `%1%' to `%2%'") + format("upgrading ‘%1%’ to ‘%2%’") % i->name % bestElem->name); newElems.push_back(*bestElem); } else newElems.push_back(*i); } catch (Error & e) { - e.addPrefix(format("while trying to find an upgrade for `%1%':\n") % i->name); + e.addPrefix(format("while trying to find an upgrade for ‘%1%’:\n") % i->name); throw; } } @@ -630,7 +630,7 @@ static void opUpgrade(Globals & globals, Strings opFlags, Strings opArgs) else if (arg == "--leq") upgradeType = utLeq; else if (arg == "--eq") upgradeType = utEq; else if (arg == "--always") upgradeType = utAlways; - else throw UsageError(format("unknown flag `%1%'") % arg); + else throw UsageError(format("unknown flag ‘%1%’") % arg); } upgradeDerivations(globals, opArgs, upgradeType); @@ -649,9 +649,9 @@ static void setMetaFlag(EvalState & state, DrvInfo & drv, static void opSetFlag(Globals & globals, Strings opFlags, Strings opArgs) { if (opFlags.size() > 0) - throw UsageError(format("unknown flag `%1%'") % opFlags.front()); + throw UsageError(format("unknown flag ‘%1%’") % opFlags.front()); if (opArgs.size() < 2) - throw UsageError("not enough arguments to `--set-flag'"); + throw UsageError("not enough arguments to ‘--set-flag’"); Strings::iterator arg = opArgs.begin(); string flagName = *arg++; @@ -668,7 +668,7 @@ static void opSetFlag(Globals & globals, Strings opFlags, Strings opArgs) DrvName drvName(i->name); foreach (DrvNames::iterator, j, selectors) if (j->matches(drvName)) { - printMsg(lvlInfo, format("setting flag on `%1%'") % i->name); + printMsg(lvlInfo, format("setting flag on ‘%1%’") % i->name); j->hits++; setMetaFlag(*globals.state, *i, flagName, flagValue); break; @@ -689,7 +689,7 @@ static void opSet(Globals & globals, Strings opFlags, Strings opArgs) for (Strings::iterator i = opFlags.begin(); i != opFlags.end(); ) { string arg = *i++; if (parseInstallSourceOptions(globals, i, opFlags, arg)) ; - else throw UsageError(format("unknown flag `%1%'") % arg); + else throw UsageError(format("unknown flag ‘%1%’") % arg); } DrvInfos elems; @@ -736,7 +736,7 @@ static void uninstallDerivations(Globals & globals, Strings & selectors, if ((isPath(*j) && i->queryOutPath() == followLinksToStorePath(*j)) || DrvName(*j).matches(drvName)) { - printMsg(lvlInfo, format("uninstalling `%1%'") % i->name); + printMsg(lvlInfo, format("uninstalling ‘%1%’") % i->name); found = true; break; } @@ -754,7 +754,7 @@ static void uninstallDerivations(Globals & globals, Strings & selectors, static void opUninstall(Globals & globals, Strings opFlags, Strings opArgs) { if (opFlags.size() > 0) - throw UsageError(format("unknown flag `%1%'") % opFlags.front()); + throw UsageError(format("unknown flag ‘%1%’") % opFlags.front()); uninstallDerivations(globals, opArgs, globals.profile); } @@ -864,7 +864,7 @@ static void queryJSON(Globals & globals, vector<DrvInfo> & elems) metaObj.attr(*j); Value * v = i->queryMeta(*j); if (!v) { - printMsg(lvlError, format("derivation `%1%' has invalid meta attribute `%2%'") % i->name % *j); + printMsg(lvlError, format("derivation ‘%1%’ has invalid meta attribute ‘%2%’") % i->name % *j); cout << "null"; } else { PathSet context; @@ -914,7 +914,7 @@ static void opQuery(Globals & globals, Strings opFlags, Strings opArgs) else if (arg == "--attr" || arg == "-A") attrPath = needArg(i, opFlags, arg); else - throw UsageError(format("unknown flag `%1%'") % arg); + throw UsageError(format("unknown flag ‘%1%’") % arg); } @@ -963,7 +963,7 @@ static void opQuery(Globals & globals, Strings opFlags, Strings opArgs) try { paths.insert(i->queryOutPath()); } catch (AssertionError & e) { - printMsg(lvlTalkative, format("skipping derivation named `%1%' which gives an assertion failure") % i->name); + printMsg(lvlTalkative, format("skipping derivation named ‘%1%’ which gives an assertion failure") % i->name); i->setFailed(); } validPaths = store->queryValidPaths(paths); @@ -986,7 +986,7 @@ static void opQuery(Globals & globals, Strings opFlags, Strings opArgs) try { if (i->hasFailed()) continue; - startNest(nest, lvlDebug, format("outputting query result `%1%'") % i->attrPath); + startNest(nest, lvlDebug, format("outputting query result ‘%1%’") % i->attrPath); if (globals.prebuiltOnly && validPaths.find(i->queryOutPath()) == validPaths.end() && @@ -1107,7 +1107,7 @@ static void opQuery(Globals & globals, Strings opFlags, Strings opArgs) attrs2["name"] = *j; Value * v = i->queryMeta(*j); if (!v) - printMsg(lvlError, format("derivation `%1%' has invalid meta attribute `%2%'") % i->name % *j); + printMsg(lvlError, format("derivation ‘%1%’ has invalid meta attribute ‘%2%’") % i->name % *j); else { if (v->type == tString) { attrs2["type"] = "string"; @@ -1142,9 +1142,9 @@ static void opQuery(Globals & globals, Strings opFlags, Strings opArgs) cout.flush(); } catch (AssertionError & e) { - printMsg(lvlTalkative, format("skipping derivation named `%1%' which gives an assertion failure") % i->name); + printMsg(lvlTalkative, format("skipping derivation named ‘%1%’ which gives an assertion failure") % i->name); } catch (Error & e) { - e.addPrefix(format("while querying the derivation named `%1%':\n") % i->name); + e.addPrefix(format("while querying the derivation named ‘%1%’:\n") % i->name); throw; } } @@ -1156,7 +1156,7 @@ static void opQuery(Globals & globals, Strings opFlags, Strings opArgs) static void opSwitchProfile(Globals & globals, Strings opFlags, Strings opArgs) { if (opFlags.size() > 0) - throw UsageError(format("unknown flag `%1%'") % opFlags.front()); + throw UsageError(format("unknown flag ‘%1%’") % opFlags.front()); if (opArgs.size() != 1) throw UsageError(format("exactly one argument expected")); @@ -1204,7 +1204,7 @@ static void switchGeneration(Globals & globals, int dstGen) static void opSwitchGeneration(Globals & globals, Strings opFlags, Strings opArgs) { if (opFlags.size() > 0) - throw UsageError(format("unknown flag `%1%'") % opFlags.front()); + throw UsageError(format("unknown flag ‘%1%’") % opFlags.front()); if (opArgs.size() != 1) throw UsageError(format("exactly one argument expected")); @@ -1219,7 +1219,7 @@ static void opSwitchGeneration(Globals & globals, Strings opFlags, Strings opArg static void opRollback(Globals & globals, Strings opFlags, Strings opArgs) { if (opFlags.size() > 0) - throw UsageError(format("unknown flag `%1%'") % opFlags.front()); + throw UsageError(format("unknown flag ‘%1%’") % opFlags.front()); if (opArgs.size() != 0) throw UsageError(format("no arguments expected")); @@ -1230,7 +1230,7 @@ static void opRollback(Globals & globals, Strings opFlags, Strings opArgs) static void opListGenerations(Globals & globals, Strings opFlags, Strings opArgs) { if (opFlags.size() > 0) - throw UsageError(format("unknown flag `%1%'") % opFlags.front()); + throw UsageError(format("unknown flag ‘%1%’") % opFlags.front()); if (opArgs.size() != 0) throw UsageError(format("no arguments expected")); @@ -1267,7 +1267,7 @@ static void deleteGeneration2(Globals & globals, unsigned int gen) static void opDeleteGenerations(Globals & globals, Strings opFlags, Strings opArgs) { if (opFlags.size() > 0) - throw UsageError(format("unknown flag `%1%'") % opFlags.front()); + throw UsageError(format("unknown flag ‘%1%’") % opFlags.front()); PathLocks lock; lockProfile(lock, globals.profile); @@ -1288,7 +1288,7 @@ static void opDeleteGenerations(Globals & globals, Strings opFlags, Strings opAr int days; if (!string2Int(strDays, days) || days < 1) - throw UsageError(format("invalid number of days specifier `%1%'") % *i); + throw UsageError(format("invalid number of days specifier ‘%1%’") % *i); oldTime = curTime - days * 24 * 3600; @@ -1307,7 +1307,7 @@ static void opDeleteGenerations(Globals & globals, Strings opFlags, Strings opAr } else { int n; if (!string2Int(*i, n) || n < 0) - throw UsageError(format("invalid generation specifier `%1%'") % *i); + throw UsageError(format("invalid generation specifier ‘%1%’") % *i); bool found = false; for (Generations::iterator j = gens.begin(); j != gens.end(); ++j) { if (j->number == n) { diff --git a/src/nix-env/profiles.cc b/src/nix-env/profiles.cc index 074a5e8c9db8..d8eb0ef5269c 100644 --- a/src/nix-env/profiles.cc +++ b/src/nix-env/profiles.cc @@ -50,7 +50,7 @@ Generations findGenerations(Path profile, int & curGen) gen.number = n; struct stat st; if (lstat(gen.path.c_str(), &st) != 0) - throw SysError(format("statting `%1%'") % gen.path); + throw SysError(format("statting ‘%1%’") % gen.path); gen.creationTime = st.st_mtime; gens.push_back(gen); } @@ -99,7 +99,7 @@ Path createGeneration(Path profile, Path outPath) static void removeFile(const Path & path) { if (remove(path.c_str()) == -1) - throw SysError(format("cannot unlink `%1%'") % path); + throw SysError(format("cannot unlink ‘%1%’") % path); } @@ -125,14 +125,14 @@ void switchLink(Path link, Path target) file-not-found or other error condition. This is sufficient to atomically switch user environments. */ if (rename(tmp.c_str(), link.c_str()) != 0) - throw SysError(format("renaming `%1%' to `%2%'") % tmp % link); + throw SysError(format("renaming ‘%1%’ to ‘%2%’") % tmp % link); } void lockProfile(PathLocks & lock, const Path & profile) { lock.lockPaths(singleton<PathSet>(profile), - (format("waiting for lock on profile `%1%'") % profile).str()); + (format("waiting for lock on profile ‘%1%’") % profile).str()); lock.setDeletion(true); } diff --git a/src/nix-env/user-env.cc b/src/nix-env/user-env.cc index e71ad34edbc5..3ebd6c1f2362 100644 --- a/src/nix-env/user-env.cc +++ b/src/nix-env/user-env.cc @@ -136,7 +136,7 @@ bool createUserEnv(EvalState & state, DrvInfos & elems, Path lockTokenCur = optimisticLockProfile(profile); if (lockToken != lockTokenCur) { - printMsg(lvlError, format("profile `%1%' changed while we were busy; restarting") % profile); + printMsg(lvlError, format("profile ‘%1%’ changed while we were busy; restarting") % profile); return false; } |