From 9577d0bfe2d33afc1033f4b571a50fb7c980de6b Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Thu, 26 Sep 2013 09:13:44 +0200 Subject: [PATCH] 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. --- daklib/archive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.2