X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fupdate_db.py;h=2e1c0caa4d633414974d062378975a208f5732b4;hb=92929b13c99cd7f0533167a5cf4cf1ea679cd56e;hp=447af0af4e23990b7c74e0c20f5588c671f7c54f;hpb=554c9c0777c3444720c8d6064608cff5f89f62c0;p=dak.git diff --git a/dak/update_db.py b/dak/update_db.py index 447af0af..2e1c0caa 100755 --- a/dak/update_db.py +++ b/dak/update_db.py @@ -46,7 +46,7 @@ from daklib.daklog import Logger ################################################################################ Cnf = None -required_database_schema = 59 +required_database_schema = 63 ################################################################################ @@ -119,7 +119,7 @@ Updates dak's database schema to the lastest version. You should disable crontab # Ok, try and find the configuration table print "Determining dak database revision ..." cnf = Config() - logger = Logger(cnf.Cnf, 'update-db') + logger = Logger('update-db') try: # Build a connect string @@ -198,7 +198,7 @@ Updates dak's database schema to the lastest version. You should disable crontab self.usage(exit_code=1) try: - lock_fd = os.open(cnf["Dinstall::LockFile"], os.O_RDWR | os.O_CREAT) + lock_fd = os.open(os.path.join(cnf["Dir::Lock"], 'dinstall.lock'), os.O_RDWR | os.O_CREAT) fcntl.lockf(lock_fd, fcntl.LOCK_EX | fcntl.LOCK_NB) except IOError, e: if errno.errorcode[e.errno] == 'EACCES' or errno.errorcode[e.errno] == 'EAGAIN':