From 64519cfd657d024ae6e2bb74cb21ad21b886fd2a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 3 Dec 2008 15:06:30 +0000 Subject: * Unify the treatment of sources copied to the store, and recursive SHA-256 outputs of fixed-output derivations. I.e. they now produce the same store path: $ nix-store --add x /nix/store/j2fq9qxvvxgqymvpszhs773ncci45xsj-x $ nix-store --add-fixed --recursive sha256 x /nix/store/j2fq9qxvvxgqymvpszhs773ncci45xsj-x the latter being the same as the path that a derivation derivation { name = "x"; outputHashAlgo = "sha256"; outputHashMode = "recursive"; outputHash = "..."; ... }; produces. This does change the output path for such fixed-output derivations. Fortunately they are quite rare. The most common use is fetchsvn calls with SHA-256 hashes. (There are a handful of those is Nixpkgs, mostly unstable development packages.) * Documented the computation of store paths (in store-api.cc). --- src/nix-worker/nix-worker.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nix-worker') diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc index 1ba74f46fee9..e4fe94926b63 100644 --- a/src/nix-worker/nix-worker.cc +++ b/src/nix-worker/nix-worker.cc @@ -290,7 +290,7 @@ static void performOp(unsigned int clientVersion, case wopAddToStore: { /* !!! uberquick hack */ string baseName = readString(from); - bool fixed = readInt(from) == 1; + readInt(from); /* obsolete; was `fixed' flag */ bool recursive = readInt(from) == 1; string hashAlgo = readString(from); @@ -300,7 +300,7 @@ static void performOp(unsigned int clientVersion, restorePath(tmp2, from); startWork(); - Path path = store->addToStore(tmp2, fixed, recursive, hashAlgo); + Path path = store->addToStore(tmp2, recursive, hashAlgo); stopWork(); writeString(path, to); -- cgit 1.4.1