diff --git a/pkg/private/tar/tar_writer.py b/pkg/private/tar/tar_writer.py index 06d0cad6..756fcea4 100644 --- a/pkg/private/tar/tar_writer.py +++ b/pkg/private/tar/tar_writer.py @@ -130,9 +130,12 @@ def _addfile(self, info, fileobj=None): if not info.name.endswith('/'): info.name += '/' if not self.allow_dups_from_deps and self._have_added(info.name): + # Directories with different contents should get merged without warnings. + # If they have overlapping content, the warning will be on their duplicate *files* instead + if info.type != tarfile.DIRTYPE: print('Duplicate file in archive: %s, ' 'picking first occurrence' % info.name) - return + return self.tar.addfile(info, fileobj) self.members.add(info.name)