[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] 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 e480443..6071566 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)

Reply to: