1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-19 16:59:35 +01:00

* Start of `nix-store --export' operation for serialising a store

path.  This is like `nix-store --dump', only it also dumps the
  meta-information of the store path (references, deriver).  Will add
  a `--sign' flag later to add a cryptographic signature, which we
  will use for exchanging store paths between build farm machines in a
  secure manner.
This commit is contained in:
Eelco Dolstra 2007-02-20 23:17:20 +00:00
parent 3390c1be76
commit b824a1daee
6 changed files with 50 additions and 0 deletions

View file

@ -696,6 +696,24 @@ Path LocalStore::addTextToStore(const string & suffix, const string & s,
}
void LocalStore::exportPath(const Path & path, bool sign,
Sink & sink)
{
assertStorePath(path);
dumpPath(path, sink);
writeString(path, sink);
PathSet references;
queryReferences(path, references);
writeStringSet(references, sink);
Path deriver = queryDeriver(noTxn, path);
writeString(deriver, sink);
}
void deleteFromStore(const Path & _path, unsigned long long & bytesFreed)
{
bytesFreed = 0;