]> git.decadent.org.uk Git - dak.git/blobdiff - dak/update_db.py
Merge commit 'origin/master'
[dak.git] / dak / update_db.py
index fc2e3e17e0fb808b3f7dc1181e80f87f26bf08fd..e9dfa9a7a12c0401ab9331f772497c6502090227 100755 (executable)
@@ -37,15 +37,14 @@ import os
 import apt_pkg
 import time
 import errno
-from daklib import database
+
 from daklib import utils
 from daklib.dak_exceptions import DBUpdateError
 
 ################################################################################
 
 Cnf = None
-projectB = None
-required_database_schema = 4
+required_database_schema = 19
 
 ################################################################################
 
@@ -86,8 +85,6 @@ Updates dak's database schema to the lastest version. You should disable crontab
 ################################################################################
 
     def get_db_rev(self):
-        global projectB
-
         # We keep database revision info the config table
         # Try and access it
 
@@ -144,7 +141,7 @@ Updates dak's database schema to the lastest version. You should disable crontab
             sys.exit(0)
 
         for i in range (database_revision, required_database_schema):
-            print "updating databse schema from " + str(database_revision) + " to " + str(i+1)
+            print "updating database schema from " + str(database_revision) + " to " + str(i+1)
             try:
                 dakdb = __import__("dakdb", globals(), locals(), ['update'+str(i+1)])
                 update_module = getattr(dakdb, "update"+str(i+1))
@@ -159,7 +156,7 @@ Updates dak's database schema to the lastest version. You should disable crontab
 ################################################################################
 
     def init (self):
-        global Cnf, projectB
+        global Cnf
 
         Cnf = utils.get_conf()
         arguments = [('h', "help", "Update-DB::Options::Help")]