* Substitutes and nix-pull now work again.
* Fixed a segfault caused by the buffering of stderr. * Fix now allows the specification of the full output path. This should be used with great care, since it by-passes the normal hash generation. * Incremented the version number to 0.4 (prerelease).
This commit is contained in:
parent
ab5e8767fa
commit
0791282b2f
12 changed files with 169 additions and 89 deletions
14
src/store.cc
14
src/store.cc
|
|
@ -175,7 +175,8 @@ void registerSuccessor(const Transaction & txn,
|
|||
|
||||
Paths revs;
|
||||
nixDB.queryStrings(txn, dbSuccessorsRev, sucPath, revs);
|
||||
revs.push_back(srcPath);
|
||||
if (find(revs.begin(), revs.end(), srcPath) == revs.end())
|
||||
revs.push_back(srcPath);
|
||||
|
||||
nixDB.setString(txn, dbSuccessors, srcPath, sucPath);
|
||||
nixDB.setStrings(txn, dbSuccessorsRev, sucPath, revs);
|
||||
|
|
@ -212,7 +213,8 @@ void registerSubstitute(const Path & srcPath, const Path & subPath)
|
|||
|
||||
Paths revs;
|
||||
nixDB.queryStrings(txn, dbSubstitutesRev, subPath, revs);
|
||||
revs.push_back(srcPath);
|
||||
if (find(revs.begin(), revs.end(), srcPath) == revs.end())
|
||||
revs.push_back(srcPath);
|
||||
|
||||
nixDB.setStrings(txn, dbSubstitutes, srcPath, subs);
|
||||
nixDB.setStrings(txn, dbSubstitutesRev, subPath, revs);
|
||||
|
|
@ -221,6 +223,14 @@ void registerSubstitute(const Path & srcPath, const Path & subPath)
|
|||
}
|
||||
|
||||
|
||||
Paths querySubstitutes(const Path & srcPath)
|
||||
{
|
||||
Paths subPaths;
|
||||
nixDB.queryStrings(noTxn, dbSubstitutes, srcPath, subPaths);
|
||||
return subPaths;
|
||||
}
|
||||
|
||||
|
||||
void registerValidPath(const Transaction & txn, const Path & _path)
|
||||
{
|
||||
Path path(canonPath(_path));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue