summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Kuryloski <kuryloskip@vmware.com>2021-09-30 16:26:33 +0200
committerPhilip Kuryloski <kuryloskip@vmware.com>2021-09-30 16:26:33 +0200
commit1d4ddceb5d4b24a161acf534e091d436ce6bbb91 (patch)
tree2e6f6b8562d450f565e88e0965a39ff196152cf7
parent8c243c592d47c7253cc57a899e754a603e52a7b0 (diff)
downloadrabbitmq-server-git-1d4ddceb5d4b24a161acf534e091d436ce6bbb91.tar.gz
Fix handling of priv dirs for external deps
These were placed incorrectly for rabbitmq_home rules in bazel
-rw-r--r--rabbitmq_home.bzl12
1 files changed, 8 insertions, 4 deletions
diff --git a/rabbitmq_home.bzl b/rabbitmq_home.bzl
index a91e487c3d..6342d75f40 100644
--- a/rabbitmq_home.bzl
+++ b/rabbitmq_home.bzl
@@ -29,13 +29,17 @@ def _link_escript(ctx, escript):
return s
def _priv_file_dest_relative_path(plugin_label, f):
- rel_base = plugin_label.package
if plugin_label.workspace_root != "":
- rel_base = path_join(plugin_label.workspace_root, rel_base)
- if rel_base == "":
- return f.path
+ if plugin_label.package != "":
+ rel_base = path_join(plugin_label.workspace_root, plugin_label.package)
+ else:
+ rel_base = plugin_label.workspace_root
else:
+ rel_base = plugin_label.package
+ if rel_base != "":
return f.path.replace(rel_base + "/", "")
+ else:
+ return f.path
def _plugins_dir_links(ctx, plugin):
lib_info = plugin[ErlangLibInfo]