* Simplify the substitute mechanism:

- Drop the store expression.  So now a substitute is just a
    command-line invocation (a program name + arguments).  If you
    register a substitute you are responsible for registering the
    expression that built it (if any) as a root of the garbage
    collector.
  - Drop the substitutes-rev DB table.
This commit is contained in:
Eelco Dolstra 2004-12-20 13:43:32 +00:00
parent 015beb7cd0
commit fa9259f5f5
5 changed files with 42 additions and 122 deletions

View file

@ -14,10 +14,6 @@ using namespace std;
network). */
struct Substitute
{
/* Store expression to be normalised and realised in order to
obtain `program'. */
Path storeExpr;
/* Program to be executed to create the store path. Must be in
the output path of `storeExpr'. */
Path program;
@ -73,6 +69,9 @@ void registerSubstitutes(const Transaction & txn,
/* Return the substitutes expression for the given path. */
Substitutes querySubstitutes(const Path & srcPath);
/* Deregister all substitutes. */
void clearSubstitutes();
/* Register the validity of a path. */
void registerValidPath(const Transaction & txn, const Path & path);