From: Mike O'Connor <stew@dhcp-101.dfw1.kickstart.lan>
Date: Wed, 28 Oct 2009 19:22:45 +0000 (+0000)
Subject: get rid of stew config hacks
X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=11fb06440931b860a9182ff9188ddf6d60741d35;p=dak.git

get rid of stew config hacks
---

diff --git a/dak/update_db.py b/dak/update_db.py
index 7d7fe9fe..a51c7c1b 100755
--- a/dak/update_db.py
+++ b/dak/update_db.py
@@ -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.")
 
 
 ################################################################################
diff --git a/daklib/config.py b/daklib/config.py
index b98a6fc9..09df17bb 100755
--- a/daklib/config.py
+++ b/daklib/config.py
@@ -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())
diff --git a/daklib/utils.py b/daklib/utils.py
index ec1cd366..d88dbbda 100755
--- a/daklib/utils.py
+++ b/daklib/utils.py
@@ -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