forked from lix-project/lix
* Terminology fixes.
This commit is contained in:
parent
6bb5efadec
commit
6a0a2d5593
|
@ -15,7 +15,7 @@
|
||||||
#include "globals.hh"
|
#include "globals.hh"
|
||||||
|
|
||||||
|
|
||||||
/* !!! TODO storeExprFromPath shouldn't be used here */
|
/* !!! TODO derivationFromPath shouldn't be used here */
|
||||||
|
|
||||||
|
|
||||||
static string pathNullDevice = "/dev/null";
|
static string pathNullDevice = "/dev/null";
|
||||||
|
@ -129,7 +129,7 @@ private:
|
||||||
unsigned int nrChildren;
|
unsigned int nrChildren;
|
||||||
|
|
||||||
/* Maps used to prevent multiple instantiations of a goal for the
|
/* Maps used to prevent multiple instantiations of a goal for the
|
||||||
same expression / path. */
|
same derivation / path. */
|
||||||
WeakGoalMap derivationGoals;
|
WeakGoalMap derivationGoals;
|
||||||
WeakGoalMap substitutionGoals;
|
WeakGoalMap substitutionGoals;
|
||||||
|
|
||||||
|
@ -290,10 +290,10 @@ const char * * strings2CharPtrs(const Strings & ss)
|
||||||
class DerivationGoal : public Goal
|
class DerivationGoal : public Goal
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
/* The path of the derivation store expression. */
|
/* The path of the derivation. */
|
||||||
Path drvPath;
|
Path drvPath;
|
||||||
|
|
||||||
/* The derivation store expression stored at drvPath. */
|
/* The derivation stored at drvPath. */
|
||||||
Derivation drv;
|
Derivation drv;
|
||||||
|
|
||||||
/* The remainder is state held during the build. */
|
/* The remainder is state held during the build. */
|
||||||
|
@ -415,7 +415,7 @@ void DerivationGoal::init()
|
||||||
{
|
{
|
||||||
trace("init");
|
trace("init");
|
||||||
|
|
||||||
/* The first thing to do is to make sure that the store expression
|
/* The first thing to do is to make sure that the derivation
|
||||||
exists. If it doesn't, it may be created through a
|
exists. If it doesn't, it may be created through a
|
||||||
substitute. */
|
substitute. */
|
||||||
addWaitee(worker.makeSubstitutionGoal(drvPath));
|
addWaitee(worker.makeSubstitutionGoal(drvPath));
|
||||||
|
@ -735,8 +735,8 @@ DerivationGoal::HookReply DerivationGoal::tryBuildHook()
|
||||||
% showPaths(outputPaths(drv.outputs)));
|
% showPaths(outputPaths(drv.outputs)));
|
||||||
|
|
||||||
/* Write the information that the hook needs to perform the
|
/* Write the information that the hook needs to perform the
|
||||||
build, i.e., the set of input paths (including closure
|
build, i.e., the set of input paths, the set of output
|
||||||
expressions), the set of output paths, and [!!!]. */
|
paths, and [!!!]. */
|
||||||
|
|
||||||
Path inputListFN = tmpDir + "/inputs";
|
Path inputListFN = tmpDir + "/inputs";
|
||||||
Path outputListFN = tmpDir + "/outputs";
|
Path outputListFN = tmpDir + "/outputs";
|
||||||
|
@ -791,7 +791,7 @@ bool DerivationGoal::prepareBuild()
|
||||||
reuse its results. (Strictly speaking the first check can be
|
reuse its results. (Strictly speaking the first check can be
|
||||||
omitted, but that would be less efficient.) Note that since we
|
omitted, but that would be less efficient.) Note that since we
|
||||||
now hold the locks on the output paths, no other process can
|
now hold the locks on the output paths, no other process can
|
||||||
build this expression, so no further checks are necessary. */
|
build this derivation, so no further checks are necessary. */
|
||||||
if (allOutputsValid()) {
|
if (allOutputsValid()) {
|
||||||
debug(format("skipping build of derivation `%1%', someone beat us to it")
|
debug(format("skipping build of derivation `%1%', someone beat us to it")
|
||||||
% drvPath);
|
% drvPath);
|
||||||
|
@ -910,7 +910,7 @@ void DerivationGoal::startBuilder()
|
||||||
in the store or in the build directory). */
|
in the store or in the build directory). */
|
||||||
env["NIX_STORE"] = nixStore;
|
env["NIX_STORE"] = nixStore;
|
||||||
|
|
||||||
/* Add all bindings specified in the derivation expression. */
|
/* Add all bindings specified in the derivation. */
|
||||||
for (StringPairs::iterator i = drv.env.begin();
|
for (StringPairs::iterator i = drv.env.begin();
|
||||||
i != drv.env.end(); ++i)
|
i != drv.env.end(); ++i)
|
||||||
env[i->first] = i->second;
|
env[i->first] = i->second;
|
||||||
|
|
|
@ -3,20 +3,20 @@
|
||||||
|
|
||||||
#include "derivations.hh"
|
#include "derivations.hh"
|
||||||
|
|
||||||
/* Perform the specified derivations, if necessary. That is, do
|
/* Ensure that the output paths of the derivation are valid. If they
|
||||||
whatever is necessary to create the output paths of the derivation.
|
are already valid, this is a no-op. Otherwise, validity can
|
||||||
If the output paths already exists, we're done. If they have
|
be reached in two ways. First, if the output paths have
|
||||||
substitutes, we can use those instead. Otherwise, the build action
|
substitutes, then those can be used. Second, the output paths can
|
||||||
described by the derivation is performed, after recursively
|
be created by running the builder, after recursively building any
|
||||||
building any sub-derivations. */
|
sub-derivations. */
|
||||||
void buildDerivations(const PathSet & drvPaths);
|
void buildDerivations(const PathSet & drvPaths);
|
||||||
|
|
||||||
/* Ensure that a path exists, possibly by instantiating it by
|
/* Ensure that a path is valid. If it is not currently valid, it may
|
||||||
realising a substitute. */
|
be made valid by running a substitute (if defined for the path). */
|
||||||
void ensurePath(const Path & storePath);
|
void ensurePath(const Path & storePath);
|
||||||
|
|
||||||
/* Read a derivation store expression, after ensuring its existence
|
/* Read a derivation, after ensuring its existence through
|
||||||
through ensurePath(). */
|
ensurePath(). */
|
||||||
Derivation derivationFromPath(const Path & drvPath);
|
Derivation derivationFromPath(const Path & drvPath);
|
||||||
|
|
||||||
/* Place in `paths' the set of all store paths in the file system
|
/* Place in `paths' the set of all store paths in the file system
|
||||||
|
|
|
@ -22,7 +22,7 @@ Path writeDerivation(const Derivation & drv, const string & name)
|
||||||
static void checkPath(const string & s)
|
static void checkPath(const string & s)
|
||||||
{
|
{
|
||||||
if (s.size() == 0 || s[0] != '/')
|
if (s.size() == 0 || s[0] != '/')
|
||||||
throw Error(format("bad path `%1%' in store expression") % s);
|
throw Error(format("bad path `%1%' in derivation") % s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ static TableId dbReferers = 0;
|
||||||
One system can compute a derivate and put it on a website (as a Nix
|
One system can compute a derivate and put it on a website (as a Nix
|
||||||
archive), for instance, and then another system can register a
|
archive), for instance, and then another system can register a
|
||||||
substitute for that derivate. The substitute in this case might be
|
substitute for that derivate. The substitute in this case might be
|
||||||
a Nix expression that fetches the Nix archive.
|
a Nix derivation that fetches the Nix archive.
|
||||||
*/
|
*/
|
||||||
static TableId dbSubstitutes = 0;
|
static TableId dbSubstitutes = 0;
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ typedef list<pair<Path, Substitute> > SubstitutePairs;
|
||||||
void registerSubstitutes(const Transaction & txn,
|
void registerSubstitutes(const Transaction & txn,
|
||||||
const SubstitutePairs & subPairs);
|
const SubstitutePairs & subPairs);
|
||||||
|
|
||||||
/* Return the substitutes expression for the given path. */
|
/* Return the substitutes for the given path. */
|
||||||
Substitutes querySubstitutes(const Path & srcPath);
|
Substitutes querySubstitutes(const Path & srcPath);
|
||||||
|
|
||||||
/* Deregister all substitutes. */
|
/* Deregister all substitutes. */
|
||||||
|
|
Loading…
Reference in a new issue