X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=b532c351ac050d22ccd5434100058d520a7f04a0;hb=d0b5ef925b72dc0610d34037606f15cb81e02e7c;hp=c290b60f84a8f0c9f789c72c3843e7af58db516f;hpb=b58774e49de73e6ec962720cc2d86c0002036929;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py index c290b60f..b532c351 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -398,11 +398,11 @@ class DBConn(Singleton): else: row = cursor.fetchone() - if row[1] != size or row[2] != md5sum: + if row[1] != int(size) or row[2] != md5sum: res = -2 else: - self.caches[cachename].SetValue(values, row[0]) + self.caches['files'].SetValue(values, row[0]) res = row[0] return res @@ -548,11 +548,13 @@ class DBConn(Singleton): try: arch_id = self.get_architecture_id(package['Architecture']) - # Remove any already existing recorded files for this package + # Remove any already existing recorded files for this package c.execute("""DELETE FROM pending_content_associations WHERE package=%(Package)s AND version=%(Version)s - AND arch_id=%d""" % arch_id, package ) + AND architecture=%(ArchID)s""", {'Package': package['Package'], + 'Version': package['Version'], + 'ArchID': arch_id}) for fullpath in fullpaths: (path, file) = os.path.split(fullpath)