]> err.no Git - dak/commitdiff
add our own deb_extract_control function
authorAnsgar Burchardt <ansgar@debian.org>
Wed, 9 May 2012 10:44:08 +0000 (12:44 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Wed, 9 May 2012 10:44:08 +0000 (12:44 +0200)
debExtractControl from apt_inst was deprecated and removed.

daklib/utils.py

index 38a987faf701f7e73d0f5a905e915b5f7858c9c8..0b8a08d5700a67951d2d6c297d810b2373b0c3b1 100755 (executable)
@@ -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")