+ def read_control(self):
+ '''
+ Reads the control information from a binary.
+
+ @rtype: tuple
+ @return: (stanza, controldict) stanza is the text of the control
+ section. controldict is the information in a dictionary
+ form
+ '''
+ import apt_inst, apt_pk
+ fullpath = self.poolfile.fullpath
+ deb_file = open(fullpath, 'r')
+ stanza = apt_inst.debExtractControl(deb_file).rstrip()
+ control = dict(apt_pkg.TagSection(stanza))
+ deb_file.close()
+
+ return stanza, control
+
+