From: Giuseppe Bilotta Date: Mon, 9 Apr 2007 21:46:41 +0000 (+0000) Subject: database: rbot will now refuse to run on bdb versions lower than 4.x, and it will... X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=51cd66a19fe4b1a3a3cd1dedd5b1f37ab08ccdc8;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git database: rbot will now refuse to run on bdb versions lower than 4.x, and it will recommend version 4.2 or higher --- 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