mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 15:56:18 +02:00
* A transaction is unnecessary since the path cannot be
garbage-collected (it's a temporary root).
This commit is contained in:
parent
d7caac3e81
commit
f789ea1d09
1 changed files with 3 additions and 8 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue