aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/db.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-10-25 14:38:23 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-10-25 14:38:23 +0000
commitf4d44a002688262d33093494a7fea1bb11b97ac9 (patch)
tree9768179865220106bd1c0103361ded0967c059c8 /src/libstore/db.hh
parent3ade3e7721df981614bbb2420baeb84e58085967 (diff)
* Allow certain operations to succeed even if we don't have write
permission to the Nix store or database. E.g., `nix-env -qa' will work, but `nix-env -qas' won't (the latter needs DB access). The option `--readonly-mode' forces this mode; otherwise, it's only activated when the database cannot be opened.
Diffstat (limited to 'src/libstore/db.hh')
-rw-r--r--src/libstore/db.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstore/db.hh b/src/libstore/db.hh
index bbeabfc7d..d566fdad1 100644
--- a/src/libstore/db.hh
+++ b/src/libstore/db.hh
@@ -87,4 +87,11 @@ public:
};
+class DbNoPermission : public Error
+{
+public:
+ DbNoPermission(const format & f) : Error(f) { };
+};
+
+
#endif /* !__DB_H */