From ba437f451e1c32c398f8ea2e8c852164d64b3816 Mon Sep 17 00:00:00 2001 From: Wouter den Breejen Date: Tue, 10 Jul 2007 09:23:42 +0000 Subject: [PATCH] --- src/libexpr/primops.cc | 13 ------------- src/libstore/local-store.cc | 2 +- src/libstore/store-api.cc | 5 ++--- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index f23765bb0..56f01ed1f 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -641,19 +641,6 @@ static Expr prim_derivationStrict(EvalState & state, const ATermVector & args) printMsg(lvlChatty, format("instantiated `%1%' -> `%2%'") % drvName % drvPath); - - //printMsg(lvlError, format("PRIMOPS %1%") % drvPath); - /* Write updated (no need to rebuild) state derivations to the database, so they can be updated at build time - if(enableState && !disableState){ - if(store->isValidPath(outPath)){ //Only add when the path is already valid - Path deriver = queryDeriver(noTxn, outPath); //query the deriver - if(deriver != drvPath){ - store->addUpdatedStateDerivation(drvPath, outPath); - } - } - } - */ - /* Optimisation, but required in read-only mode! because in that case we don't actually write store expressions, so we can't read them later. */ diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index f7ade82a9..93bced5be 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -631,7 +631,7 @@ void setDeriver(const Transaction & txn, const Path & storePath, const Path & de if (!isRealisablePath(txn, storePath)) throw Error(format("path `%1%' is not valid") % storePath); - printMsg(lvlError, format("Ttttttttttttttttttttttttt %1%") % deriver); + //printMsg(lvlError, format("Ttttttttttttttttttttttttt %1%") % deriver); if (isStateDrvPathTxn(txn, deriver)){ //Redirect if its a state component //hanges somtimes !!!!!!!!!!!!!!!!!!! addStateDeriver(txn, storePath, deriver); diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index f898845d2..c9064b094 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -146,9 +146,8 @@ void checkStatePath(const Derivation & drv) string stateIdentifier = drv.stateOutputs.find("state")->second.stateIdentifier; Path calculatedPath = makeStatePath(componentHash, suffix, stateIdentifier); - printMsg(lvlError, format("CHECK: %1% %2%") % drvPath % calculatedPath); - - + printMsg(lvlError, format("Checking statePath validity: %1% %2%") % drvPath % calculatedPath); + if(drvPath != calculatedPath) Error(format("The statepath from the Derivation does not match the recalculated statepath, are u trying to spoof the statepath?")); }