X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Farchive.py;h=3b55b3f79092fe55429e0bc599a0a77822b29474;hb=5b02ab776b1f62c8420186fde11b533dbea3801d;hp=44931ffc0a55424866875e7210cf5522ffa3d2c1;hpb=ce7ea2e8d86f4c6a0d9c8f546cf46f19cd26ec2c;p=dak.git diff --git a/daklib/archive.py b/daklib/archive.py index 44931ffc..3b55b3f7 100644 --- a/daklib/archive.py +++ b/daklib/archive.py @@ -176,6 +176,10 @@ class ArchiveTransaction(object): maintainer=maintainer, poolfile=db_file, binarytype=binary.type, + ) + # Other attributes that are ignored for purposes of equality with + # an existing source + rest2 = dict( fingerprint=fingerprint, ) @@ -188,6 +192,8 @@ class ArchiveTransaction(object): db_binary = DBBinary(**unique) for key, value in rest.iteritems(): setattr(db_binary, key, value) + for key, value in rest2.iteritems(): + setattr(db_binary, key, value) session.add(db_binary) session.flush() import_metadata_into_db(db_binary, session) @@ -301,12 +307,16 @@ class ArchiveTransaction(object): ) rest = dict( maintainer=maintainer, - changedby=changed_by, #install_date=datetime.now().date(), poolfile=db_file_dsc, - fingerprint=fingerprint, dm_upload_allowed=(control.get('DM-Upload-Allowed', 'no') == 'yes'), ) + # Other attributes that are ignored for purposes of equality with + # an existing source + rest2 = dict( + changedby=changed_by, + fingerprint=fingerprint, + ) created = False try: @@ -319,6 +329,8 @@ class ArchiveTransaction(object): db_source = DBSource(**unique) for key, value in rest.iteritems(): setattr(db_source, key, value) + for key, value in rest2.iteritems(): + setattr(db_source, key, value) # XXX: set as default in postgres? db_source.install_date = datetime.now().date() session.add(db_source)