X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=a31e9167c6cd4671a55274be67188bc39ff0c521;hb=9bf86e38837121c738aae1eb5e1dbdaf69656198;hp=80a1f233ad29341a3e13972372811c466c25ff4c;hpb=6b3c8ccbd61325e2b833ed252b5545a190bff92f;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 80a1f233..a31e9167 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -75,7 +75,6 @@ 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 @@ -501,7 +500,7 @@ def subprocess_setup(): class DBBinary(ORMObject): def __init__(self, package = None, source = None, version = None, \ maintainer = None, architecture = None, poolfile = None, \ - binarytype = 'deb'): + binarytype = 'deb', fingerprint=None): self.package = package self.source = source self.version = version @@ -509,6 +508,7 @@ class DBBinary(ORMObject): self.architecture = architecture self.poolfile = poolfile self.binarytype = binarytype + self.fingerprint = fingerprint @property def pkid(self): @@ -559,7 +559,7 @@ class DBBinary(ORMObject): @rtype: text @return: stanza text of the control section. ''' - import apt_inst + import utils fullpath = self.poolfile.fullpath deb_file = open(fullpath, 'r') stanza = utils.deb_extract_control(deb_file) @@ -2460,13 +2460,14 @@ class Dak822(Deb822): class DBSource(ORMObject): def __init__(self, source = None, version = None, maintainer = None, \ - changedby = None, poolfile = None, install_date = None): + changedby = None, poolfile = None, install_date = None, fingerprint = None): self.source = source self.version = version self.maintainer = maintainer self.changedby = changedby self.poolfile = poolfile self.install_date = install_date + self.fingerprint = fingerprint @property def pkid(self): @@ -2479,7 +2480,7 @@ class DBSource(ORMObject): def not_null_constraints(self): return ['source', 'version', 'install_date', 'maintainer', \ - 'changedby', 'poolfile', 'install_date'] + 'changedby', 'poolfile'] def read_control_fields(self): '''