[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] which_apt_conf_file



do the same for the apt.conf files

Signed-off-by: Joerg Jaspert <joerg@debian.org>
---
 daklib/utils.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/daklib/utils.py b/daklib/utils.py
index 01ed2ed..c40fe8e 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:
-- 
1.5.6.5


Reply to: