From: Ansgar Burchardt Date: Thu, 26 Sep 2013 07:13:44 +0000 (+0200) Subject: daklib/archive.py: fix copying between components X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=9577d0bfe2d33afc1033f4b571a50fb7c980de6b;p=dak.git daklib/archive.py: fix copying between components The _copy_file() method needs to check if the file is already in the target component. Having it in any component is not enough if it should be copied to an additional component in the same archive. --- diff --git a/daklib/archive.py b/daklib/archive.py index e4804433..6071566c 100644 --- a/daklib/archive.py +++ b/daklib/archive.py @@ -388,7 +388,7 @@ class ArchiveTransaction(object): """ session = self.session - if session.query(ArchiveFile).filter_by(archive=archive, file=db_file).first() is None: + if session.query(ArchiveFile).filter_by(archive=archive, component=component, file=db_file).first() is None: query = session.query(ArchiveFile).filter_by(file=db_file) if not allow_tainted: query = query.join(Archive).filter(Archive.tainted == False)