From ddf7664d57269562e4d5d21f3088f8aecc443cc3 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Sun, 19 Apr 2009 18:45:29 +0200 Subject: [PATCH] which_apt_conf_file do the same for the apt.conf files Signed-off-by: Joerg Jaspert --- daklib/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) 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: -- 2.39.5