I'm using pkg_tar to combine tars produced with rules_distroless and some other tars into an OCI image layer. However, upon loading the layer using Docker or Podman, I get the following error:
Error processing tar file(duplicates of file paths not supported).
After analyzing the resulting tar archive, I have determined that the issue was caused by the presence of a symbolic link from /lib to /usr/lib in one of the packages and a /lib directory in one of the other packages. It seems that pkg_tar incorrectly deduplicates tar file entries when one of the the member's type is a directory and the other member's type is not (e.g. it is a symlink).
The behavour I would expect in this case is that if the symlink precedes the directory, then the member should remain a symlink. If the directory precedes the symlink, the directory should remain a directory and a warning should be displayed.