From: Ansgar Burchardt Date: Wed, 9 May 2012 10:44:08 +0000 (+0200) Subject: add our own deb_extract_control function X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=285d9d1082571671d6ea35bf743bca63440da8d3;p=dak add our own deb_extract_control function debExtractControl from apt_inst was deprecated and removed. --- diff --git a/daklib/utils.py b/daklib/utils.py index 38a987fa..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 @@ -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")