From f1e5dedb611d39ecc600fccb4eba4b0de730c5fc Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Sun, 24 Nov 2013 21:22:23 +0100 Subject: [PATCH] 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. --- perl/lib/Nix/Store.xs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs index c449ed5241..d46af57e64 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) {