bazel-contrib / bazel-lib

Common useful functions for writing BUILD files and Starlark macros/rules
Apache License 2.0
141 stars 91 forks source link

`strip_prefix="/"` in `mtree_mutate()` deletes everything #946

Open mering opened 2 months ago

mering commented 2 months ago

We want to make all paths relative by using strip_prefix = "/". While this works just fine with pkg_tar, when using mtree_mutate() it deletes the whole file instead of just removing the / prefix from all paths.

thesayyn commented 4 weeks ago

Hmm that sounds bad, fixes are welcome, note that strip_prefix is not supposed to be identical to pkg_tar.