-
Notifications
You must be signed in to change notification settings - Fork 217
package_dir attribute is not applied to pkg_mklink #610
Copy link
Copy link
Closed
Labels
Description
I'm upgrading from rules_pkg 0.5.2 to rules_pkg 0.7.0 and trying to use the new "package_dir" parameter to add the "./" prefix that was removed as part of (#531).
But it seems that "package_dir" does not work with pkg_mklink.
The following code illustrates the problem:
load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("@rules_pkg//:mappings.bzl", "pkg_mklink", "pkg_files")
pkg_files(
name = "myfile_pkg",
srcs = ["myfile"],
)
pkg_mklink(
name = "mylink_lnk",
link_name = "mylink",
target = "myfile",
)
pkg_tar(
name = "myarchive",
srcs = ["myfile_pkg", "mylink_lnk"],
package_dir = "."
)
Invoking
bazel build myarhive.tar
tar tf bazel-bin/myarchive.tar
Gives:
./myfile
mylink
I would have expected:
./myfile
./mylink
Reactions are currently unavailable