X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=0b8a08d5700a67951d2d6c297d810b2373b0c3b1;hb=57506ea6e65079371445778f63ed15812c3fe874;hp=9afd420e8d154f4824440c7c304812dadc0a68fa;hpb=18405d5895036334ecc86a6db6f2eb22dbdc798a;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index 9afd420e..0b8a08d5 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -33,6 +33,7 @@ import sys import tempfile import traceback import stat +import apt_inst import apt_pkg import time import re @@ -765,7 +766,7 @@ def which_conf_file (): homedir = os.getenv("HOME") confpath = os.path.join(homedir, "/etc/dak.conf") if os.path.exists(confpath): - apt_pkg.ReadConfigFileISC(Cnf,default_config) + apt_pkg.ReadConfigFileISC(Cnf,confpath) # We are still in here, so there is no local config file or we do # not allow local files. Do the normal stuff. @@ -1625,3 +1626,9 @@ def get_packages_from_ftp(root, suite, component, architecture): Packages = apt_pkg.ParseTagFile(packages) os.unlink(temp_file) return Packages + +################################################################################ + +def deb_extract_control(fh): + """extract DEBIAN/control from a binary package""" + return apt_inst.DebFile(fh).control.extractdata("control")