1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-27 12:41:00 +01:00

* Configure option --disable-old-db-compat to build without Berkeley

DB, which is only needed for converting old databases.
This commit is contained in:
Eelco Dolstra 2008-03-09 20:30:34 +00:00
parent 341b2de643
commit bcc3862331
7 changed files with 38 additions and 8 deletions

View file

@ -19,6 +19,8 @@ Hash parseHashField(const Path & path, const string & s);
meta-information in files. */
void LocalStore::upgradeStore12()
{
#if OLD_DB_COMPAT
if (!lockFile(globalLock, ltWrite, false)) {
printMsg(lvlError, "waiting for exclusive access to the Nix store...");
lockFile(globalLock, ltWrite, true);
@ -88,6 +90,12 @@ void LocalStore::upgradeStore12()
writeFile(schemaPath, (format("%1%") % nixSchemaVersion).str());
lockFile(globalLock, ltRead, true);
#else
throw Error(
"Your Nix store has a database in Berkeley DB format. To convert\n"
"to the new format, please compile Nix with Berkeley DB support.");
#endif
}