From 349516d6c7dbcab7da34ca8a499a585086559a97 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sat, 1 Mar 2025 23:55:42 +0100 Subject: [PATCH] libstore: remove unused parameter of Store::addToStore Change-Id: I2816ed2689da8adb5634da180389e049e6ace6bc --- lix/libstore/binary-cache-store.cc | 5 ++--- lix/libstore/binary-cache-store.hh | 3 +-- lix/libstore/build/local-derivation-goal.cc | 3 +-- lix/libstore/legacy-ssh-store.cc | 3 +-- lix/libstore/store-api.cc | 5 ++--- lix/libstore/store-api.hh | 3 +-- 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/lix/libstore/binary-cache-store.cc b/lix/libstore/binary-cache-store.cc index 6815e2ace..2d18e368c 100644 --- a/lix/libstore/binary-cache-store.cc +++ b/lix/libstore/binary-cache-store.cc @@ -382,8 +382,7 @@ kj::Promise> BinaryCacheStore::addToStore( FileIngestionMethod method, HashType hashAlgo, PathFilter & filter, - RepairFlag repair, - const StorePathSet & references) + RepairFlag repair) try { /* FIXME: Make BinaryCacheStore::addToStoreCommon support non-recursive+sha256 so we can just use the default @@ -406,7 +405,7 @@ try { .method = method, .hash = h, .references = { - .others = references, + .others = {}, // caller is not capable of creating a self-reference, because this is content-addressed without modulus .self = false, }, diff --git a/lix/libstore/binary-cache-store.hh b/lix/libstore/binary-cache-store.hh index 10fdb7588..356d5636f 100644 --- a/lix/libstore/binary-cache-store.hh +++ b/lix/libstore/binary-cache-store.hh @@ -125,8 +125,7 @@ public: FileIngestionMethod method, HashType hashAlgo, PathFilter & filter, - RepairFlag repair, - const StorePathSet & references) override; + RepairFlag repair) override; kj::Promise> addTextToStore( std::string_view name, diff --git a/lix/libstore/build/local-derivation-goal.cc b/lix/libstore/build/local-derivation-goal.cc index c89cd42cb..804c99084 100644 --- a/lix/libstore/build/local-derivation-goal.cc +++ b/lix/libstore/build/local-derivation-goal.cc @@ -1087,8 +1087,7 @@ struct RestrictedStore : public virtual IndirectRootStore, public virtual GcStor FileIngestionMethod method, HashType hashAlgo, PathFilter & filter, - RepairFlag repair, - const StorePathSet & references) override + RepairFlag repair) override try { throw Error("addToStore"); } catch (...) { return {result::current_exception()}; } kj::Promise> addToStore(const ValidPathInfo & info, Source & narSource, diff --git a/lix/libstore/legacy-ssh-store.cc b/lix/libstore/legacy-ssh-store.cc index a03a48213..030676e34 100644 --- a/lix/libstore/legacy-ssh-store.cc +++ b/lix/libstore/legacy-ssh-store.cc @@ -268,8 +268,7 @@ struct LegacySSHStore final : public Store FileIngestionMethod method, HashType hashAlgo, PathFilter & filter, - RepairFlag repair, - const StorePathSet & references) override + RepairFlag repair) override try { unsupported("addToStore"); } catch (...) { return {result::current_exception()}; } kj::Promise> addTextToStore( diff --git a/lix/libstore/store-api.cc b/lix/libstore/store-api.cc index 317f99811..e3f9ae76b 100644 --- a/lix/libstore/store-api.cc +++ b/lix/libstore/store-api.cc @@ -279,15 +279,14 @@ kj::Promise> Store::addToStore( FileIngestionMethod method, HashType hashAlgo, PathFilter & filter, - RepairFlag repair, - const StorePathSet & references) + RepairFlag repair) try { Path srcPath(absPath(_srcPath)); auto source = GeneratorSource{ method == FileIngestionMethod::Recursive ? dumpPath(srcPath, filter).decay() : readFileSource(srcPath) }; - co_return TRY_AWAIT(addToStoreFromDump(source, name, method, hashAlgo, repair, references)); + co_return TRY_AWAIT(addToStoreFromDump(source, name, method, hashAlgo, repair, {})); } catch (...) { co_return result::current_exception(); } diff --git a/lix/libstore/store-api.hh b/lix/libstore/store-api.hh index c78858507..e06d8f862 100644 --- a/lix/libstore/store-api.hh +++ b/lix/libstore/store-api.hh @@ -531,8 +531,7 @@ public: FileIngestionMethod method = FileIngestionMethod::Recursive, HashType hashAlgo = HashType::SHA256, PathFilter & filter = defaultPathFilter, - RepairFlag repair = NoRepair, - const StorePathSet & references = StorePathSet()); + RepairFlag repair = NoRepair); /** * Copy the contents of a path to the store and register the