From: Joerg Jaspert Date: Sun, 19 Apr 2009 16:45:29 +0000 (+0200) Subject: which_apt_conf_file X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=ddf7664d57269562e4d5d21f3088f8aecc443cc3;p=dak.git which_apt_conf_file do the same for the apt.conf files Signed-off-by: Joerg Jaspert --- diff --git a/daklib/utils.py b/daklib/utils.py index 01ed2ede..c40fe8e0 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -761,6 +761,13 @@ def which_conf_file (): def which_apt_conf_file (): res = socket.gethostbyaddr(socket.gethostname()) + # In case we allow local config files per user, try if one exists + if Cnf.FindB("Config::" + res[0] + "::AllowLocalConfig"): + homedir = os.getenv("HOME") + confpath = os.path.join(homedir, "/etc/dak.conf") + if os.path.exists(confpath): + apt_pkg.ReadConfigFileISC(Cnf,default_config) + if Cnf.get("Config::" + res[0] + "::AptConfig"): return Cnf["Config::" + res[0] + "::AptConfig"] else: