Skip to content

Commit

Permalink
Fix labels pointing to helper tools. (#32)
Browse files Browse the repository at this point in the history
Do not override the path to helper tools in every test. Doing that
hid the fact that the paths were defined wrong in the rule.
  • Loading branch information
aiuto authored Jun 7, 2019
1 parent 864739f commit 86acfe2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pkg/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ py_library(
"archive.py",
],
srcs_version = "PY2AND3",
visibility = ["//visibility:public"],
visibility = ["@//tests:__pkg__"],
)

py_binary(
Expand Down
4 changes: 2 additions & 2 deletions pkg/pkg.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ _real_pkg_tar = rule(
"remap_paths": attr.string_dict(),
# Implicit dependencies.
"build_tar": attr.label(
default = Label("//tools/build_defs/pkg:build_tar"),
default = Label("@rules_pkg//:build_tar"),
cfg = "host",
executable = True,
allow_files = True,
Expand Down Expand Up @@ -311,7 +311,7 @@ pkg_deb = rule(
"recommends": attr.string_list(default = []),
# Implicit dependencies.
"make_deb": attr.label(
default = Label("//tools/build_defs/pkg:make_deb"),
default = Label("@rules_pkg//:make_deb"),
cfg = "host",
executable = True,
allow_files = True,
Expand Down
2 changes: 1 addition & 1 deletion pkg/rpm.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ pkg_rpm = rule(
# Implicit dependencies.
"rpmbuild_path": attr.string(),
"_make_rpm": attr.label(
default = Label("//tools/build_defs/pkg:make_rpm"),
default = Label("@rules_pkg//:make_rpm"),
cfg = "host",
executable = True,
allow_files = True,
Expand Down
8 changes: 0 additions & 8 deletions pkg/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ pkg_tar(
srcs = [
":etc/nsswitch.conf",
],
build_tar = "@rules_pkg//:build_tar",
strip_prefix = "",
)

Expand All @@ -131,15 +130,13 @@ pkg_tar(
srcs = [
":etc/nsswitch.conf",
],
build_tar = "@rules_pkg//:build_tar",
)

pkg_tar(
name = "test-tar-strip_prefix-etc",
srcs = [
":etc/nsswitch.conf",
],
build_tar = "@rules_pkg//:build_tar",
strip_prefix = "etc",
)

Expand All @@ -148,21 +145,18 @@ pkg_tar(
srcs = [
":etc/nsswitch.conf",
],
build_tar = "@rules_pkg//:build_tar",
strip_prefix = ".",
)

pkg_tar(
name = "test-tar-files_dict",
build_tar = "@rules_pkg//:build_tar",
files = {
":etc/nsswitch.conf": "not-etc/mapped-filename.conf",
},
)

pkg_tar(
name = "test-tar-empty_files",
build_tar = "@rules_pkg//:build_tar",
empty_files = [
"/a",
"/b",
Expand All @@ -172,7 +166,6 @@ pkg_tar(

pkg_tar(
name = "test-tar-empty_dirs",
build_tar = "@rules_pkg//:build_tar",
empty_dirs = [
"/tmp",
"/pmt",
Expand All @@ -185,7 +178,6 @@ pkg_tar(
srcs = [
":etc/nsswitch.conf",
],
build_tar = "@rules_pkg//:build_tar",
mtime = 946684740, # 1999-12-31, 23:59
portable_mtime = False,
)
Expand Down

0 comments on commit 86acfe2

Please sign in to comment.