Skip to content

Commit

Permalink
Fix tar2files bazel integration
Browse files Browse the repository at this point in the history
The names that are passed to bazeldnf need to include the
directory part too, otherwise having two files with the same
name in different paths triggers a failure:

  + bazel run --config x86_64 //rpm:sandbox_s390x
  ...
  Error in _tar2files: generated file 'cc-toolchain_s390x/errno.h'
  in rule 'cc-toolchain_s390x/usr/include/asm' conflicts with
  existing generated file from rule 'cc-toolchain_s390x/usr/include'

Signed-off-by: Andrea Bolognani <[email protected]>
  • Loading branch information
andreabolognani committed Nov 14, 2023
1 parent df83839 commit 5b26a65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/rpmtree.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def tar2files(**kwargs):
name = basename + k
files = []
for file in v:
files = files + [basename + "/" + file]
files = files + [name + "/" + file]
_tar2files(
name = name,
prefix = k,
Expand Down

0 comments on commit 5b26a65

Please sign in to comment.