X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=c40fe8e0efafcde03c217151f647c1a1672e3f97;hb=cc53effc5d93836b818fe23ba17ee5aa374365d5;hp=cb7efbea9c313767f5b98923bd89efdfce4bca04;hpb=ad21c975269100ed4f1f31d968410f5a1375b268;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index cb7efbea..c40fe8e0 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -750,7 +750,7 @@ def which_conf_file (): homedir = os.getenv("HOME") confpath = os.path.join(homedir, "/etc/dak.conf") if os.path.exists(confpath): - return confpath + apt_pkg.ReadConfigFileISC(Cnf,default_config) # We are still in here, so there is no local config file or we do # not allow local files. Do the normal stuff. @@ -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: