blob: 567aba70551e5836c8936bac43e1ae521a08e9a7 [file] [log] [blame]
Philipp Schrader0f5d2502022-03-08 22:44:55 -08001From d654cc64ae71366ea82ac492106e9b2c8fa532d5 Mon Sep 17 00:00:00 2001
2From: Philipp Schrader <philipp.schrader@gmail.com>
3Date: Thu, 10 Mar 2022 23:25:21 -0800
4Subject: [PATCH] Fix tree artifacts
5
6For some reason the upstream code strips the directory names from the
7`babel()` rule that we use. This patch makes it so the directory is
8not stripped. This makes runfiles layout in the tarball match the
9runfiles layout in `bazel-bin`.
10---
11 pkg/pkg.bzl | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/pkg/pkg.bzl b/pkg/pkg.bzl
15index d7adbbc..a241b26 100644
16--- a/pkg/pkg.bzl
17+++ b/pkg/pkg.bzl
18@@ -157,8 +157,8 @@ def _pkg_tar_impl(ctx):
19 # Tree artifacts need a name, but the name is never really
20 # the important part. The likely behavior people want is
21 # just the content, so we strip the directory name.
22- dest = "/".join(d_path.split("/")[0:-1])
23- add_tree_artifact(content_map, dest, f, src.label)
24+ #dest = "/".join(d_path.split("/")[0:-1])
25+ add_tree_artifact(content_map, d_path, f, src.label)
26 else:
27 # Note: This extra remap is the bottleneck preventing this
28 # large block from being a utility method as shown below.