Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix name collision with tar2files command #83

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kellyma2
Copy link

@kellyma2 kellyma2 commented Dec 3, 2024

If two files have the same name but are found in different subdirectories then tar2files will fail. An example of this is found in abseil-cpp where there are multiple headers with the same name, but sometimes in different subdirectories of /usr/include.

This change tweaks our tarfile handling so as to key our lookup map based on the path minus anything before the expected prefix (this will remove the bazel-out/... bits from the paths generated by the tar2files rule. This provides enough context to avoid the name collisions but is still able to deal with the correct path lookup.

If two files have the same name but are found in different
subdirectories then tar2files will fail.  An example of this is found
in abseil-cpp where there are multiple headers with the same name, but
sometimes in different subdirectories of `/usr/include`.

This change tweaks our tarfile handling so as to key our lookup map
based on the path minus anything before the expected prefix (this will
remove the `bazel-out/...` bits from the paths generated by the
tar2files rule.  This provides enough context to avoid the name
collisions but is still able to deal with the correct path lookup.
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.

1 participant