aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQyriad <qyriad@qyriad.me>2024-05-25 01:52:44 +0000
committerGerrit Code Review <gerrit@lix-systems>2024-05-25 01:52:44 +0000
commit1c0f3c540ed222cc7ab460785f07837091642b1e (patch)
tree81fd96bd55677ae84fe777d871035433fc08f2df
parent076c19e0d1a6ad226d002a359df666216fa97950 (diff)
parentd0390b5cf2d232febaa89aa6d8b07c547513a460 (diff)
Merge changes I3ab84cc5,Iba34ad42 into main
* changes: nix3: always use the same verbosity default (info) libfetchers: log fetches by URL just before they happen
-rw-r--r--src/libfetchers/fetchers.cc4
-rw-r--r--src/nix/main.cc5
-rw-r--r--tests/functional/nix-profile.sh1
3 files changed, 5 insertions, 5 deletions
diff --git a/src/libfetchers/fetchers.cc b/src/libfetchers/fetchers.cc
index dc8df2217..210912cb6 100644
--- a/src/libfetchers/fetchers.cc
+++ b/src/libfetchers/fetchers.cc
@@ -133,6 +133,10 @@ std::pair<Tree, Input> Input::fetch(ref<Store> store) const
}
auto [storePath, input] = [&]() -> std::pair<StorePath, Input> {
+ // *sighs*, we print the base URL, rather than the full URL because the Nixpkgs
+ // fileset lib tests assume that fetching shallow and non-shallow prints exactly the
+ // same stderr...
+ printInfo("fetching %s input '%s'", this->getType(), this->toURL().base);
try {
return scheme->fetch(store, *this);
} catch (Error & e) {
diff --git a/src/nix/main.cc b/src/nix/main.cc
index 64755d445..83d697326 100644
--- a/src/nix/main.cc
+++ b/src/nix/main.cc
@@ -363,11 +363,6 @@ void mainWrapped(int argc, char * * argv)
setLogFormat("bar");
settings.verboseBuild = false;
- if (isatty(STDERR_FILENO)) {
- verbosity = lvlNotice;
- } else {
- verbosity = lvlInfo;
- }
NixArgs args;
diff --git a/tests/functional/nix-profile.sh b/tests/functional/nix-profile.sh
index ed014f9ef..13a73ead9 100644
--- a/tests/functional/nix-profile.sh
+++ b/tests/functional/nix-profile.sh
@@ -155,6 +155,7 @@ diff -u <(
nix --offline profile install $flake2Dir 2>&1 1> /dev/null \
| grep -vE "^warning: " \
| grep -vE "^error \(ignored\): " \
+ | grep -vE "^fetching .+ input" \
|| true
) <(cat << EOF
error: An existing package already provides the following file: