X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=inline;f=daklib%2Futils.py;h=0b8a08d5700a67951d2d6c297d810b2373b0c3b1;hb=285d9d1082571671d6ea35bf743bca63440da8d3;hp=9afd420e8d154f4824440c7c304812dadc0a68fa;hpb=bc5df21e92f0791f1967d77b1baf66966c66f7cd;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")