debExtractControl from apt_inst was deprecated and removed.
import tempfile
import traceback
import stat
+import apt_inst
import apt_pkg
import time
import re
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")