From e74ef417db4cc956e56dc0188a8331b8f1ca577d Mon Sep 17 00:00:00 2001 From: Sergei Zimmerman Date: Fri, 15 Aug 2025 00:55:03 +0300 Subject: [PATCH] libstore: Fix makeCopyPathMessage Old code completely ignored query parameters and it seems ok to keep that behavior. There's a lot of code out there that parses nix code like nix-output-monitor and it can't parse messages like: > copying path '/nix/store/wha2hi4yhkjmccqhivxavbfspsg1wrsj-source' from 'https://cache.nixos.org' to 'local://'... Let's not break these tools without a good reason. This goes in line with what other code does by ignoring parameters in logs. The issue is just in detecting the shorthand notations for the store reference - not in printing the url in logs. By default the daemon opens a local store with ?path-info-cache-size=0, so that leads to the erronenous 'local://'. --- src/libstore/store-api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 493137361..2c4d0302c 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -803,7 +803,7 @@ makeCopyPathMessage(const StoreConfig & srcCfg, const StoreConfig & dstCfg, std: /* At this point StoreReference **must** be resolved. */ const auto & specified = std::get(ref.variant); const auto & scheme = specified.scheme; - return (scheme == "local" || scheme == "unix") && specified.authority.empty() && ref.params.empty(); + return (scheme == "local" || scheme == "unix") && specified.authority.empty(); }; if (isShorthand(src))