From f789ea1d098c2755e97f7ee6ebc418f71e5f56f6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 1 Mar 2008 21:05:33 +0000 Subject: [PATCH] * A transaction is unnecessary since the path cannot be garbage-collected (it's a temporary root). --- src/libstore/local-store.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 12a73b70c..6a8de7bc4 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -628,11 +628,8 @@ void LocalStore::exportPath(const Path & path, bool sign, { assertStorePath(path); - /* Wrap all of this in a transaction to make sure that we export - consistent metadata. */ - Transaction txn(nixDB); addTempRoot(path); - if (!isValidPathTxn(txn, path)) + if (!isValidPath(path)) throw Error(format("path `%1%' is not valid") % path); HashAndWriteSink hashAndWriteSink(sink); @@ -644,10 +641,10 @@ void LocalStore::exportPath(const Path & path, bool sign, writeString(path, hashAndWriteSink); PathSet references; - nix::queryReferences(txn, path, references); + queryReferences(path, references); writeStringSet(references, hashAndWriteSink); - Path deriver = nix::queryDeriver(txn, path); + Path deriver = queryDeriver(path); writeString(deriver, hashAndWriteSink); if (sign) { @@ -677,8 +674,6 @@ void LocalStore::exportPath(const Path & path, bool sign, } else writeInt(0, hashAndWriteSink); - - txn.commit(); }