diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-11-09 15:57:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 15:57:39 +0100 |
commit | 67179472dfe30c97af9a5aeed0190c0e765936cf (patch) | |
tree | 8062dace9a6fec19a6095a13fc844ff8601313e4 /src/libstore/local-store.cc | |
parent | 884ef336c4bf838d853056d8abb926a71786afa6 (diff) | |
parent | 0b005bc9d67b3f621bc78e5ecb2cd834172d5563 (diff) |
Merge pull request #5494 from tweag/balsoft/allow-references-in-addPath
Allow references in addPath
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r-- | src/libstore/local-store.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index eb3457339..eecd407f5 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -1308,7 +1308,7 @@ void LocalStore::addToStore(const ValidPathInfo & info, Source & source, StorePath LocalStore::addToStoreFromDump(Source & source0, const string & name, - FileIngestionMethod method, HashType hashAlgo, RepairFlag repair) + FileIngestionMethod method, HashType hashAlgo, RepairFlag repair, const StorePathSet & references) { /* For computing the store path. */ auto hashSink = std::make_unique<HashSink>(hashAlgo); @@ -1364,7 +1364,7 @@ StorePath LocalStore::addToStoreFromDump(Source & source0, const string & name, auto [hash, size] = hashSink->finish(); - auto dstPath = makeFixedOutputPath(method, hash, name); + auto dstPath = makeFixedOutputPath(method, hash, name, references); addTempRoot(dstPath); @@ -1411,6 +1411,7 @@ StorePath LocalStore::addToStoreFromDump(Source & source0, const string & name, ValidPathInfo info { dstPath, narHash.first }; info.narSize = narHash.second; + info.references = references; info.ca = FixedOutputHash { .method = method, .hash = hash }; registerValidPath(info); } |