Skip to content

Commit

Permalink
REMOVEME: temporary debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
gibfahn committed Sep 6, 2021
1 parent 3e24154 commit 69a9ab9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 4 additions & 5 deletions container/layer.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,14 @@ def build_layer(
args.add("--enable_mtime_preservation=true")

xz_path = toolchain_info.xz_path
xz_tools = []
xz_input_manifests = []
if toolchain_info.xz_target:
xz_path = toolchain_info.xz_target.files_to_run.executable.path
xz_tools, _, xz_input_manifests = ctx.resolve_command(tools = [toolchain_info.xz_target])
elif toolchain_info.xz_path == "":
fail("xz could not be found. Make sure it is in the path or set it " +
"explicitly in the docker_toolchain_configure")
else:
xz_tools = []
xz_input_manifests = []
print("WARNING: xz could not be found. Make sure it is in the path or set it " +
"explicitly in the docker_toolchain_configure")
args.add(xz_path, format = "--xz_path=%s")

# Windows layer.tar require two separate root directories instead of just 1
Expand Down
7 changes: 7 additions & 0 deletions toolchains/docker/toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ def _toolchain_configure_impl(repository_ctx):
xz_attr = "xz_path = \"%s\"," % repository_ctx.attr.xz_path
elif repository_ctx.which("xz"):
xz_attr = "xz_path = \"%s\"," % repository_ctx.which("xz")
print("GIB: xz_attr: {}".format(xz_attr))
print("GIB: PATH: {}".format(repository_ctx.os.environ))
repository_ctx.execute(["/bin/bash", "-cx", """ls -l /usr/local/bin/
sw_vers
xcrun --find xz
find / -name xz 2>/dev/null
"""], quiet = False)

gzip_attr = ""
if repository_ctx.attr.gzip_target:
Expand Down

0 comments on commit 69a9ab9

Please sign in to comment.