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

pkg_tar has both package_dir and package_base. #549

Closed
aiuto opened this issue Feb 16, 2022 · 1 comment · Fixed by #554
Closed

pkg_tar has both package_dir and package_base. #549

aiuto opened this issue Feb 16, 2022 · 1 comment · Fixed by #554
Assignees
Labels
P1 An issue that must be resolved. Must have an assignee
Milestone

Comments

@aiuto
Copy link
Collaborator

aiuto commented Feb 16, 2022

This is needlessly confusing. They both almost do the same thing, and the reason for the semantic difference is lost to history.

@aiuto aiuto self-assigned this Feb 16, 2022
@aiuto aiuto added the P1 An issue that must be resolved. Must have an assignee label Feb 16, 2022
@aiuto aiuto added this to the 1.0 milestone Feb 16, 2022
@aiuto
Copy link
Collaborator Author

aiuto commented Feb 16, 2022

package_dir should be the only one. That has a longer history of use.
It should probably be prefix, because that is consistent with other rules.

aiuto added a commit to aiuto/rules_pkg that referenced this issue Mar 3, 2022
Fixes: bazelbuild#531

- Remove leading './' from merged tar files. Also applies to pkg_deb.
- Remove package_base from pkg_tar. Closes bazelbuild#549
- Use build_tar --directory as the prefix to add to everything.

Note that the code is intentionaly not testing use cases that try to add "./"
as an explicit root. This might still work, but it is a bad idea, for the
reasons described in bazelbuild#531 . If someone comes up with a real need for
using a leading "./" AND it does not work, they can file a feature
request to support it.
aiuto added a commit to aiuto/rules_pkg that referenced this issue Mar 4, 2022
Fixes: bazelbuild#531

- Remove leading './' from merged tar files. Also applies to pkg_deb.
- Remove package_base from pkg_tar. Closes bazelbuild#549
- Use build_tar --directory as the prefix to add to everything.

Note that the code is intentionaly not testing use cases that try to add "./"
as an explicit root. This might still work, but it is a bad idea, for the
reasons described in bazelbuild#531 . If someone comes up with a real need for
using a leading "./" AND it does not work, they can file a feature
request to support it.
@aiuto aiuto closed this as completed in #554 Mar 5, 2022
aiuto added a commit that referenced this issue Mar 5, 2022
* Fix pkg_tar to not add the ./ to the prefix of every member.

Fixes: #531

- Remove leading './' from merged tar files. Also applies to pkg_deb.
- Remove package_base from pkg_tar. Closes #549
- Use build_tar --directory as the prefix to add to everything.

Note that the code is intentionaly not testing use cases that try to add "./"
as an explicit root. This might still work, but it is a bad idea, for the
reasons described in #531 . If someone comes up with a real need for
using a leading "./" AND it does not work, they can file a feature
request to support it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 An issue that must be resolved. Must have an assignee
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant