-
Notifications
You must be signed in to change notification settings - Fork 179
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
When pkg_tar.prefix_dir == base of symlink path, don't double-dip. #749
Conversation
user has already mapped the prefix_dir into those paths. Under the old behavior, prefix_dir was (incorrectly) not added to symlinks, so some users made the desired prefix part of the link. Protecting them against the double inclusion of the prefix is probably the least surprising behavior. Add tests for this, which required improving verify_archive_test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Why is |
It's obsolete because we have the equivalent in the pkg_files rule. Rather
than maintain features
in tar only, but putting it in pkg_files we can reuse that in zip, deb, and
rpm.
The files and symlinks features in pkg_tar were never quite designed. They
were hacked in over time
at Google to solve some team's immediate needs.
…On Mon, Oct 23, 2023 at 2:10 PM Alexander Coffin ***@***.***> wrote:
Why is pkg_tar-files now labeled as "obsolete"? I use this feature very
heavily, and would be curious what the replacement for it is (or what I
should be doing instead of using pkg_tar-files)?
—
Reply to this email directly, view it on GitHub
<#749 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXHHHDQGBKWYEWBFAC37GLYA2XJ5AVCNFSM6AAAAAA4IBNLTWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZVG42DOMJZGQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
That makes sense, thank you for helping me out. I'll try converting our internal usage to |
Correct for case where tar has prefix_dir and files/symlinks, but the user has already mapped the prefix_dir into those paths. Under the old behavior, prefix_dir was (incorrectly) not added to symlinks, so some users made the desired prefix part of the link. Protecting them against the double inclusion of the prefix is not strictly pedantic, but is the least surprising behavior, as their intent was most likely to get what the old behavior would have achived.
Add tests for this, which required improving verify_archive_test.
Along the way, it seems that tree artifacts with internal symlinks are a problem. This might be a bazel bug.
#750 is a reminder to look in to this some day.