aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-30 19:55:41 -0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-30 19:55:41 -0400
commit97421eb5ecde86b75441094fda017b12b5eca2a6 (patch)
tree97ab7442b5bf13363320b4facb50d2f3e384d8ed /src/libstore/local-store.hh
parentd50d7a287416da2086b0b24f9d998eabb24c1734 (diff)
Refactor settings processing
Put all Nix configuration flags in a Settings object.
Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r--src/libstore/local-store.hh49
1 files changed, 23 insertions, 26 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index 4761658ed..7cf9fc18d 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -75,7 +75,7 @@ struct SQLiteStmt
void bind64(long long value);
void bind();
};
-
+
class LocalStore : public StoreAPI
{
@@ -84,7 +84,7 @@ private:
RunningSubstituters runningSubstituters;
Path linksDir;
-
+
public:
/* Initialise the local store, upgrading the schema if
@@ -92,15 +92,15 @@ public:
LocalStore(bool reserveSpace = true);
~LocalStore();
-
+
/* Implementations of abstract store API methods. */
-
+
bool isValidPath(const Path & path);
PathSet queryValidPaths(const PathSet & paths);
-
+
PathSet queryAllValidPaths();
-
+
ValidPathInfo queryPathInfo(const Path & path);
Hash queryPathHash(const Path & path);
@@ -120,17 +120,17 @@ public:
PathSet queryDerivationOutputs(const Path & path);
StringSet queryDerivationOutputNames(const Path & path);
-
+
Path queryPathFromHashPart(const string & hashPart);
-
+
PathSet querySubstitutablePaths(const PathSet & paths);
void querySubstitutablePathInfos(const Path & substituter,
PathSet & paths, SubstitutablePathInfos & infos);
-
+
void querySubstitutablePathInfos(const PathSet & paths,
SubstitutablePathInfos & infos);
-
+
Path addToStore(const Path & srcPath,
bool recursive = true, HashType hashAlgo = htSHA256,
PathFilter & filter = defaultPathFilter);
@@ -149,7 +149,7 @@ public:
Sink & sink);
Paths importPaths(bool requireSignature, Source & source);
-
+
void buildPaths(const PathSet & paths);
void ensurePath(const Path & path);
@@ -157,7 +157,7 @@ public:
void addTempRoot(const Path & path);
void addIndirectRoot(const Path & path);
-
+
void syncWithGC();
Roots findRoots();
@@ -170,7 +170,7 @@ public:
/* Optimise a single store path. */
void optimisePath(const Path & path);
-
+
/* Check the integrity of the Nix store. */
void verifyStore(bool checkContents);
@@ -229,18 +229,18 @@ private:
unsigned long long queryValidPathId(const Path & path);
unsigned long long addValidPath(const ValidPathInfo & info, bool checkOutputs = true);
-
+
void addReference(unsigned long long referrer, unsigned long long reference);
-
+
void appendReferrer(const Path & from, const Path & to, bool lock);
-
+
void rewriteReferrers(const Path & path, bool purge, PathSet referrers);
void invalidatePath(const Path & path);
/* Delete a path from the Nix store. */
void invalidatePathChecked(const Path & path);
-
+
void verifyPath(const Path & path, const PathSet & store,
PathSet & done, PathSet & validPaths);
@@ -253,14 +253,14 @@ private:
struct GCState;
void deleteGarbage(GCState & state, const Path & path);
-
+
bool tryToDelete(GCState & state, const Path & path);
-
+
bool isActiveTempFile(const GCState & state,
const Path & path, const string & suffix);
-
+
int openGCLock(LockType lockType);
-
+
void removeUnusedLinks();
void startSubstituter(const Path & substituter,
@@ -269,7 +269,7 @@ private:
Path createTempDirInStore();
Path importPath(bool requireSignature, Source & source);
-
+
void checkDerivationOutputs(const Path & drvPath, const Derivation & drv);
void optimisePath_(OptimiseStats & stats, const Path & path);
@@ -290,9 +290,6 @@ void canonicalisePathMetaData(const Path & path, bool recurse);
MakeError(PathInUse, Error);
-/* Whether we are in build users mode. */
-bool haveBuildUsers();
-
/* Whether we are root. */
bool amPrivileged();
@@ -305,5 +302,5 @@ void deletePathWrapped(const Path & path,
unsigned long long & bytesFreed, unsigned long long & blocksFreed);
void deletePathWrapped(const Path & path);
-
+
}