-
Notifications
You must be signed in to change notification settings - Fork 184
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_deb: allow passing deb and changes directly #263
Conversation
This is actually broken in a non-trivial way, because the test depends on being able to refer to out_deb and out_changes explicitly in its runfiles. (Is this something that anyone does outside the test? I'm not sure.) I could change the test behavior, but I'd like to get guidance on this first. Note that other people have hit this problem as well: |
This allows for a proper select statement, since strict evaluation in the macro makes it impossible.
Okay, I think I misunderstood the constraints. The latest patch just lets you pass a select for the architecture, so that you can at least work around the problem. The API for pkg_deb is otherwise unchanged. |
This change works around an issue in rules_pkg, described here: bazelbuild/rules_pkg#263 PiperOrigin-RevId: 346720001
This change works around an issue in rules_pkg, described here: bazelbuild/rules_pkg#263 PiperOrigin-RevId: 350869030
Can you start with an issue for this where we can come up with an overall design. The package_file_name attribute from pkg_tar will be available to pkg_dep too. That takes care of half this PR in a uniform way across rules. |
AFAIU the problem is that you can't pass a select to |
I think #282 makes this obsolete. The net effect of that PR is that you can set changes explictly if you want. But if you don't, we use basename(package_file_name).changes. In turn, |
Sorry, @matzipan, I didn't actually answer your question. I don't understand why you are saying that architecture is not select()able. I just tried using a select for architecture, along with the defaulting for package_file_name and it just worked.
Of course, looking at the stackoverflow question, I see that it might not have been selectable before #282, but all the output file computations are made more rationally now. |
Hi aiuto, Thanks for the response. I was not aware of #282, which seems to address that. I think I've seen it in other Bazel extensions as well, so it's interesting that now I know how this can be fixed (I think it was rules_docker). Andrei |
#282 is submitted now. This PR might be obsolete. |
Based on your comment above, I’m happy and will close this issue. I’ll reopen if there’s something that isn’t working as expected. |
Updates bazelbuild/rules_pkg#263 PiperOrigin-RevId: 424953384
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.
M
(More detail in the commit.)
I've knocked this out quickly in anticipation of some feedback on a better way to solve this problem. Please let me know if I'm holding it wrong!