aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-02-11 16:03:47 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-02-11 16:03:47 +0000
commit80870d9291813f265a6e078c92aa535ef0b70a47 (patch)
treecf68380d6b9094789f2bc90670f70771d0e4f09b /src/libstore
parent3a99616968a7ffcc8f51bda7a781d3233aa9b428 (diff)
* Input sources should be in the set of all referenceable paths too.
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc8
-rw-r--r--src/libstore/references.cc4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index e71201785..1aa3e37ba 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -903,15 +903,15 @@ bool DerivationGoal::prepareBuild()
% drvPath % *j % i->first);
}
- debug(format("added input paths %1%") % showPaths(inputPaths));
-
- allPaths.insert(inputPaths.begin(), inputPaths.end());
-
/* Second, the input sources. */
for (PathSet::iterator i = drv.inputSrcs.begin();
i != drv.inputSrcs.end(); ++i)
computeFSClosure(*i, inputPaths);
+ debug(format("added input paths %1%") % showPaths(inputPaths));
+
+ allPaths.insert(inputPaths.begin(), inputPaths.end());
+
return true;
}
diff --git a/src/libstore/references.cc b/src/libstore/references.cc
index 5ceae6427..843aed97f 100644
--- a/src/libstore/references.cc
+++ b/src/libstore/references.cc
@@ -34,6 +34,8 @@ void checkPath(const string & path,
{
checkInterrupt();
+ debug(format("checking `%1%'") % path);
+
struct stat st;
if (lstat(path.c_str(), &st))
throw SysError(format("getting attributes of path `%1%'") % path);
@@ -48,8 +50,6 @@ void checkPath(const string & path,
else if (S_ISREG(st.st_mode)) {
- debug(format("checking `%1%'") % path);
-
AutoCloseFD fd = open(path.c_str(), O_RDONLY);
if (fd == -1) throw SysError(format("opening file `%1%'") % path);