mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 17:29:36 +01:00
Merge branch 'read-only-local-store' into overlayfs-store
This commit is contained in:
commit
04d8f202a7
4 changed files with 22 additions and 17 deletions
|
|
@ -363,7 +363,7 @@ LocalStore::LocalStore(const Params & params)
|
|||
if (!readOnly) {
|
||||
migrateCASchema(state->db, dbDir + "/ca-schema", globalLock);
|
||||
} else {
|
||||
throw Error("need to migrate to CA schema, but this cannot be done in read-only mode");
|
||||
throw Error("need to migrate to content-addressed schema, but this cannot be done in read-only mode");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -502,7 +502,7 @@ int LocalStore::getSchema()
|
|||
void LocalStore::openDB(State & state, bool create)
|
||||
{
|
||||
if (create && readOnly) {
|
||||
throw Error("unable to create database while in read-only mode");
|
||||
throw Error("cannot create database while in read-only mode");
|
||||
}
|
||||
|
||||
if (access(dbDir.c_str(), R_OK | (readOnly ? 0 : W_OK)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue