aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-04 08:53:10 +0100
committereldritch horrors <pennae@lix.systems>2024-03-04 08:53:10 +0100
commitcd654451c91088a1be8179e96865cf2aa0ea7624 (patch)
treebb90baa30bf48f1019e4b713d849eee2d3a05c50
parent43cedec6c535971d6c1cc86b009187ff742d505f (diff)
Merge pull request #9924 from 9999years/rename-yellowtxt
Rename `yellowtxt` -> `magentatxt` (cherry picked from commit fb78a99e04206e7b1df84a362bb87d3300b41855) Change-Id: I9ade553d9f499e6713aeff3463c9a653a880a051
-rw-r--r--src/libstore/build/derivation-goal.cc6
-rw-r--r--src/libstore/build/local-derivation-goal.cc2
-rw-r--r--src/libutil/fmt.hh12
3 files changed, 9 insertions, 11 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc
index e616adb71..ccbf9b591 100644
--- a/src/libstore/build/derivation-goal.cc
+++ b/src/libstore/build/derivation-goal.cc
@@ -708,7 +708,7 @@ void DerivationGoal::tryToBuild()
if (!outputLocks.lockPaths(lockFiles, "", false)) {
if (!actLock)
actLock = std::make_unique<Activity>(*logger, lvlWarn, actBuildWaiting,
- fmt("waiting for lock on %s", yellowtxt(showPaths(lockFiles))));
+ fmt("waiting for lock on %s", magentatxt(showPaths(lockFiles))));
worker.waitForAWhile(shared_from_this());
return;
}
@@ -762,7 +762,7 @@ void DerivationGoal::tryToBuild()
the wake-up timeout expires. */
if (!actLock)
actLock = std::make_unique<Activity>(*logger, lvlWarn, actBuildWaiting,
- fmt("waiting for a machine to build '%s'", yellowtxt(worker.store.printStorePath(drvPath))));
+ fmt("waiting for a machine to build '%s'", magentatxt(worker.store.printStorePath(drvPath))));
worker.waitForAWhile(shared_from_this());
outputLocks.unlock();
return;
@@ -987,7 +987,7 @@ void DerivationGoal::buildDone()
diskFull |= cleanupDecideWhetherDiskFull();
auto msg = fmt("builder for '%s' %s",
- yellowtxt(worker.store.printStorePath(drvPath)),
+ magentatxt(worker.store.printStorePath(drvPath)),
statusToString(status));
if (!logger->isVerbose() && !logTail.empty()) {
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc
index 4b090e820..1fc966951 100644
--- a/src/libstore/build/local-derivation-goal.cc
+++ b/src/libstore/build/local-derivation-goal.cc
@@ -227,7 +227,7 @@ void LocalDerivationGoal::tryLocalBuild()
if (!buildUser) {
if (!actLock)
actLock = std::make_unique<Activity>(*logger, lvlWarn, actBuildWaiting,
- fmt("waiting for a free build user ID for '%s'", yellowtxt(worker.store.printStorePath(drvPath))));
+ fmt("waiting for a free build user ID for '%s'", magentatxt(worker.store.printStorePath(drvPath))));
worker.waitForAWhile(shared_from_this());
return;
}
diff --git a/src/libutil/fmt.hh b/src/libutil/fmt.hh
index 727255b45..f552a6b77 100644
--- a/src/libutil/fmt.hh
+++ b/src/libutil/fmt.hh
@@ -58,19 +58,17 @@ inline std::string fmt(const std::string & fs, const Args & ... args)
return f.str();
}
-// -----------------------------------------------------------------------------
// format function for hints in errors. same as fmt, except templated values
-// are always in yellow.
-
+// are always in magenta.
template <class T>
-struct yellowtxt
+struct magentatxt
{
- yellowtxt(const T &s) : value(s) {}
+ magentatxt(const T &s) : value(s) {}
const T & value;
};
template <class T>
-std::ostream & operator<<(std::ostream & out, const yellowtxt<T> & y)
+std::ostream & operator<<(std::ostream & out, const magentatxt<T> & y)
{
return out << ANSI_WARNING << y.value << ANSI_NORMAL;
}
@@ -109,7 +107,7 @@ public:
template<class T>
hintformat & operator%(const T & value)
{
- fmt % yellowtxt(value);
+ fmt % magentatxt(value);
return *this;
}