From 6f245bf24a1154142acf2b8dfa620b891f461d55 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 11 May 2017 13:31:23 +0200 Subject: [PATCH] Change the meaning of info.ultimate It now means "paths that were built locally". It no longer includes paths that were added locally. For those we don't need info.ultimate, since we have the content-addressability assertion (info.ca). --- src/libstore/local-store.cc | 2 -- src/libstore/store-api.hh | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index ed03c3f42..207e8a40b 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -1010,7 +1010,6 @@ Path LocalStore::addToStoreFromDump(const string & dump, const string & name, info.path = dstPath; info.narHash = hash.first; info.narSize = hash.second; - info.ultimate = true; info.ca = makeFixedOutputCA(recursive, h); registerValidPath(info); } @@ -1073,7 +1072,6 @@ Path LocalStore::addTextToStore(const string & name, const string & s, info.narHash = narHash; info.narSize = sink.s->size(); info.references = references; - info.ultimate = true; info.ca = "text:" + hash.to_string(); registerValidPath(info); } diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index b06f5d86a..929c95a0f 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -113,9 +113,8 @@ struct ValidPathInfo uint64_t narSize = 0; // 0 = unknown uint64_t id; // internal use only - /* Whether the path is ultimately trusted, that is, it was built - locally or is content-addressable (e.g. added via addToStore() - or the result of a fixed-output derivation). */ + /* Whether the path is ultimately trusted, that is, it's a + derivation output that was built locally. */ bool ultimate = false; StringSet sigs; // note: not necessarily verified