aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Rockai <me@mornfall.net>2013-11-24 21:22:23 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-12-20 13:59:52 +0100
commitf1e5dedb611d39ecc600fccb4eba4b0de730c5fc (patch)
tree447c5385a28a6f21c07b6fcdc1a7b033bb1bcc4f
parent7d203faff6d74d839324cd082236381d20444d8e (diff)
perl: Call loadConfFile() in doInit to avoid screwing sqlite journal mode.
If the database is opened through perl bindings (and even though nix.conf has use-sqlite-wal set to false), the database is automatically converted into WAL mode. This makes the next nix process to access the database convert it back to "truncate". If the database is still open at the time in wal mode by the perl program, this fails and crashes the nix doing the wal -> truncate conversion.
-rw-r--r--perl/lib/Nix/Store.xs2
1 files changed, 2 insertions, 0 deletions
diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs
index c449ed524..d46af57e6 100644
--- a/perl/lib/Nix/Store.xs
+++ b/perl/lib/Nix/Store.xs
@@ -20,6 +20,8 @@ void doInit()
if (!store) {
try {
settings.processEnvironment();
+ settings.loadConfFile();
+ settings.update();
settings.lockCPU = false;
store = openStore();
} catch (Error & e) {