From 51cd66a19fe4b1a3a3cd1dedd5b1f37ab08ccdc8 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 9 Apr 2007 21:46:41 +0000 Subject: [PATCH] database: rbot will now refuse to run on bdb versions lower than 4.x, and it will recommend version 4.2 or higher --- lib/rbot/dbhash.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/rbot/dbhash.rb b/lib/rbot/dbhash.rb index b32da500..d793e27e 100644 --- a/lib/rbot/dbhash.rb +++ b/lib/rbot/dbhash.rb @@ -6,6 +6,18 @@ rescue Exception => e exit 2 end +if BDB::VERSION_MAJOR < 4 + fatal "Your bdb (Berkeley DB) version #{BDB::VERSION} is too old!" + fatal "rbot will only run with bdb version 4 or higher, please upgrade." + fatal "For maximum reliability, upgrade to version 4.2 or higher." + raise BDB::Fatal, BDB::VERSION + " is too old" +end + +if BDB::VERSION_MAJOR == 4 and BDB::VERSION_MINOR < 2 + warning "Your bdb (Berkeley DB) version #{BDB::VERSION} may not be reliable." + warning "If possible, try upgrade version 4.2 or later." +end + # make BTree lookups case insensitive module BDB class CIBtree < Btree -- 2.39.5