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.
"""
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)