Hey,
The below pseudocode will always pass regardless of the contents of pkg_tar-generated tarball:
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
load("@rules_pkg//pkg:verify_archive.bzl", "verify_archive_test")
pkg_tar(
name = "a_tarball",
srcs = [ ... ],
)
verify_archive_test(
name = "verify_package_contents",
must_contain_regex = [
"anything_really",
],
target = ":a_tarball",
)
Problem is with must_contain_regex implementation. The variable match is undefined and should be matched. A simple typo, apparently not tested.