]> git.decadent.org.uk Git - dak.git/commitdiff
get rid of stew config hacks
authorMike O'Connor <stew@dhcp-101.dfw1.kickstart.lan>
Wed, 28 Oct 2009 19:22:45 +0000 (19:22 +0000)
committerMike O'Connor <stew@dhcp-101.dfw1.kickstart.lan>
Wed, 28 Oct 2009 19:22:45 +0000 (19:22 +0000)
dak/update_db.py
daklib/config.py
daklib/utils.py

index 7d7fe9fe596a91082d816d77f8490e1661967c96..a51c7c1b39162b35586441ee3fac63905677eb2b 100755 (executable)
@@ -177,12 +177,12 @@ Updates dak's database schema to the lastest version. You should disable crontab
 
         self.update_db()
 
-#STU        try:
-#STU            lock_fd = os.open(Cnf["Dinstall::LockFile"], os.O_RDWR | os.O_CREAT)
-#STU            fcntl.lockf(lock_fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
-#STU        except IOError, e:
-#STU            if errno.errorcode[e.errno] == 'EACCES' or errno.errorcode[e.errno] == 'EAGAIN':
-#STU                utils.fubar("Couldn't obtain lock; assuming another 'dak process-unchecked' is already running.")
+        try:
+            lock_fd = os.open(Cnf["Dinstall::LockFile"], 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':
+                utils.fubar("Couldn't obtain lock; assuming another 'dak process-unchecked' is already running.")
 
 
 ################################################################################
index b98a6fc9db5e926b7c4871241b22fc8855a0c683..09df17bb06be100a2a753793c5416f3750cf3e30 100755 (executable)
@@ -35,8 +35,7 @@ from singleton import Singleton
 
 ################################################################################
 
-#default_config = "/etc/dak/dak.conf"
-default_config = "/home/stew/etc/dak/dak.conf"     #: default dak config, defines host properties
+default_config = "/etc/dak/dak.conf"
 
 def which_conf_file(Cnf):
     res = socket.gethostbyaddr(socket.gethostname())
index ec1cd36686f8b3f943723b430f9850a1a061e2ab..d88dbbda961e88a4948f5fbe34bed80b3304e8b7 100755 (executable)
@@ -53,8 +53,7 @@ from collections import defaultdict
 
 ################################################################################
 
-#default_config = "/etc/dak/dak.conf"     #: default dak config, defines host properties
-default_config = "/home/stew/etc/dak/dak.conf"     #: default dak config, defines host properties
+default_config = "/etc/dak/dak.conf"     #: default dak config, defines host properties
 default_apt_config = "/etc/dak/apt.conf" #: default apt config, not normally used
 
 alias_cache = None        #: Cache for email alias checks