]> git.saurik.com Git - apt.git/commitdiff
* give a useful error message for the database change
authorMichael Vogt <michael.vogt@ubuntu.com>
Wed, 26 Apr 2006 10:40:51 +0000 (12:40 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Wed, 26 Apr 2006 10:40:51 +0000 (12:40 +0200)
ftparchive/cachedb.cc

index 427fea7e4541a553b3f1be4eab089c45004ed030..0e6078642ad4833b6aa4bb200096774032389e33 100644 (file)
@@ -69,6 +69,12 @@ bool CacheDB::ReadyDB(string DB)
                             (ReadOnly?DB_RDONLY:DB_CREATE), 0644);
 
       }
+      // the database format has changed from DB_HASH to DB_BTREE in 
+      // apt 0.6.44
+      if (err == EINVAL)
+      {
+        _error->Error(_("DB format is invalid. If you upgraded from a older version of apt, please remove and re-create the database."));
+      }
       if (err)
       {
           Dbp = 0;