Open AustinSchuh opened 1 year ago
Yup. It is distinct because of historic differences in how the two were implemented.. I'm not interested in putting any more work into the deps
attribute of pkg_tar, especially in the intermediate tarball case that you are describing.
The preferred usage should have been.
pkg_files(name = "shell_history", ...)
pkg_tar(
name = "bin_files",
deps = [":more_pkg_tar_targets",],
symlinks = symlinks,
)
pkg_tar(
name = "installed_binaries",
srcs = [ ":shell_history"],
symlinks = {
"/etc/systemd/system/multi-user.target.wants/startup.service": "../startup.service",
},
tags = [
"no-remote",
],
deps = [
":bin_files",
],
)
Any work I am likely to do will be for pkg_expand. https://github.com/bazelbuild/rules_pkg/issues/355
No guarantees, but is this a "I don't want to fix this" and you'd take patches, or you don't think this should be fixed and pkg_expand should be the way to do this?
I'm in the process of migrating a ton of
pkg_tar
rules topkg_files
. I'm trying to do it incrementally to stay sane. I would expect the following two to be equivalent.and
And finally for both:
When I inspect
bin_files.tar
, I see that.zsh_history
is owned by1000.1000
. Insideinstalled_binaries
, I see it owned by0.0
. With thepkg_tar
rules for all steps, I see ownership properly tracked.