X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=1034628ea217ce39b383d0feed9ddce67ad4c90a;hb=1617994b76d0cd90ce89a7e6d9f7bb886439f010;hp=fd50cb1c7430a6f852131377bdd7bc1556262e58;hpb=a3bb8f4b75f1812f14f4df676b16fb3fc0e38be9;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index fd50cb1c..1034628e 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -43,6 +43,7 @@ import email as modemail import subprocess import ldap +import daklib.config as config from dbconn import DBConn, get_architecture, get_component, get_suite, \ get_override_type, Keyring, session_wrapper, \ get_active_keyring_paths, get_primary_keyring_path, \ @@ -1512,7 +1513,8 @@ def temp_dirname(parent=None, prefix="dak", suffix="", mode=None, group=None): if mode: os.chmod(tfname, mode) if group: - os.chown(tfname, -1, group) + gid = grp.getgrnam(group).gr_gid + os.chown(tfname, -1, gid) return tfname ################################################################################ @@ -1550,14 +1552,7 @@ def get_changes_files(from_dir): ################################################################################ -apt_pkg.init() - -Cnf = apt_pkg.Configuration() -if not os.getenv("DAK_TEST"): - apt_pkg.read_config_file_isc(Cnf,default_config) - -if which_conf_file() != default_config: - apt_pkg.read_config_file_isc(Cnf,which_conf_file()) +Cnf = config.Config().Cnf ################################################################################