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

Fixed recursive build error

This commit is contained in:
Wouter den Breejen 2007-10-12 14:01:43 +00:00
parent 0ee803935e
commit 60a32fcbf3
3 changed files with 13 additions and 7 deletions

View file

@ -2828,6 +2828,8 @@ void ensurePathTxn(const Transaction & txn, const Path & path)
if (isValidPathTxn(txn, path))
return;
printMsg(lvlError, format("ensurePathTxn(%1%)") % path);
Worker worker;
GoalPtr goal = worker.makeSubstitutionGoal(path);
Goals goals = singleton<Goals>(goal);

View file

@ -626,6 +626,9 @@ void LocalStore::queryStateReferrers(const Path & storePath, PathSet & stateRefe
nix::queryStateReferrersTxn(noTxn, storePath, stateReferrers, revision);
}
/*
* You can substitute a path withouth substituting the deriver!!!!!
*/
void setDeriver(const Transaction & txn, const Path & storePath, const Path & deriver)
{
assertStorePath(storePath);
@ -635,7 +638,11 @@ void setDeriver(const Transaction & txn, const Path & storePath, const Path & de
if (!isValidPathTxn(txn, storePath))
throw Error(format("path `%1%' is not valid") % storePath);
if (isStateDrvPathTxn(txn, deriver)){ //Redirect if its a state component
if (isStateComponentTxn(txn, storePath)){ //Redirect if its a state component
if (!isValidPathTxn(txn, deriver))
throw Error(format("Derivers `%1%' is not valid so we dont have the info for a store-state path") % storePath);
addStateDeriver(txn, storePath, deriver);
}
else{

View file

@ -12,14 +12,11 @@ namespace nix {
Derivation derivationFromPathPrivate(const bool dotxn, const Transaction & txn, const Path & drvPath)
{
assertStorePath(drvPath);
if(dotxn){
printMsg(lvlError, format("ensurePathTxn(txn,%1%)") % drvPath);
if(dotxn)
ensurePathTxn(txn, drvPath);
}
else{
printMsg(lvlError, format("store->ensurePathTxn(%1%)") % drvPath);
else
store->ensurePath(drvPath);
}
ATerm t = ATreadFromNamedFile(drvPath.c_str());
if (!t)
throw Error(format("cannot read aterm from `%1%'") % drvPath);