]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/dbconn.py
stop using deprecated python-apt functions
[dak.git] / daklib / dbconn.py
index fd2ea345a31942e882786bb36d9b872f8ec2f382..80a1f233ad29341a3e13972372811c466c25ff4c 100755 (executable)
@@ -75,6 +75,7 @@ from sqlalchemy.orm.exc import NoResultFound
 from config import Config
 from textutils import fix_maintainer
 from dak_exceptions import DBUpdateError, NoSourceFieldError, FileExistsError
+import utils
 
 # suppress some deprecation warnings in squeeze related to sqlalchemy
 import warnings
@@ -561,7 +562,7 @@ class DBBinary(ORMObject):
         import apt_inst
         fullpath = self.poolfile.fullpath
         deb_file = open(fullpath, 'r')
-        stanza = apt_inst.debExtractControl(deb_file)
+        stanza = utils.deb_extract_control(deb_file)
         deb_file.close()
 
         return stanza
@@ -3357,8 +3358,8 @@ class DBConn(object):
         mapper(Architecture, self.tbl_architecture,
             properties = dict(arch_id = self.tbl_architecture.c.id,
                suites = relation(Suite, secondary=self.tbl_suite_architectures,
-                   order_by='suite_name',
-                   backref=backref('architectures', order_by='arch_string'))),
+                   order_by=self.tbl_suite.c.suite_name,
+                   backref=backref('architectures', order_by=self.tbl_architecture.c.arch_string))),
             extension = validator)
 
         mapper(Archive, self.tbl_archive,