From: Mark Hymers Date: Wed, 23 Mar 2011 18:33:54 +0000 (+0000) Subject: Merge remote branch 'ftpmaster/master' into psimport X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=commitdiff_plain;h=b8690d6b1256a4a95198b874d9eb1aab62a825fb Merge remote branch 'ftpmaster/master' into psimport Conflicts: daklib/dbconn.py Signed-off-by: Mark Hymers --- b8690d6b1256a4a95198b874d9eb1aab62a825fb diff --cc daklib/dbconn.py index 79e0621b,6782c081..4d30e663 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@@ -2191,20 -2176,8 +2195,22 @@@ class DBSource(ORMObject) return ['source', 'version', 'install_date', 'maintainer', \ 'changedby', 'poolfile', 'install_date'] + def read_control(self): + ''' + Reads the control information from a dsc + + @rtype: tuple + @return: (stanza, controldict) stanza is the text of the control + section. controldict is the information in a dictionary + form + ''' + from debian.debfile import Deb822 + fullpath = self.poolfile.fullpath + fields = Deb822(open(self.poolfile.fullpath, 'r')) + return fields + + metadata = association_proxy('key', 'value') + __all__.append('DBSource') @session_wrapper