Skip to content

tar_writer.py: address duplicate dir warning regression#900

Merged
aiuto merged 3 commits intobazelbuild:mainfrom
Illedran:an/tarwriter-dir-check
Mar 3, 2025
Merged

tar_writer.py: address duplicate dir warning regression#900
aiuto merged 3 commits intobazelbuild:mainfrom
Illedran:an/tarwriter-dir-check

Conversation

@Illedran
Copy link
Contributor

It looks like #850 removed the check below, resulting in warning being printed on duplicate directories in addition to files:
https://github.com/bazelbuild/rules_pkg/pull/850/files#diff-9a83a2a408d04cf1937eb6d1eac00438774072bfe46a19082c7f8729d3ac4a27L133-L135

Fixes #899

@google-cla
Copy link

google-cla bot commented Nov 15, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Illedran Illedran requested a review from cgrindel November 18, 2024 08:10
@cgrindel
Copy link
Collaborator

@aiuto Some CI tests are failing. However, the failures do not appear to be related to this change. Do we know if main is green? Are there periodic tests that run on main?

@Illedran
Copy link
Contributor Author

Illedran commented Nov 18, 2024

Hold off for a second on this one - I've just tested it locally in my project to build tars for image layers to be used w/ rules_oci and it results in the tarball being unable to be docker load-ed:

1b7379da5 add: Loading layer [=>                                                 ]  32.77kB/837.1kB
duplicates of file paths not supported

I suspect that this is an issue specifically in the consumer/docker since duplicate directories should be valid - normal GNU tar handles archives produced from this PR just fine. While this does fix the warning, I'll take some time to give it another look

EDIT: switched to just suppress the warning for dirs which was my original intention. The remaining test failures are actually unrelated now I think

@Illedran Illedran requested a review from cgrindel November 18, 2024 16:18
@aiuto aiuto merged commit 433504f into bazelbuild:main Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pkg_tar incorrectly reports duplicate **file** for duplicate directories

3 participants