bazelbuild / rules_pkg

Bazel rules for creating packages of many types (zip, tar, deb, rpm, ...)
Apache License 2.0
212 stars 166 forks source link

fix: Not all runfiles are single files #860

Closed ewianda closed 2 months ago

ewianda commented 2 months ago

Handle cases where the defaultInfo file is a directory

aiuto commented 2 months ago

Please add a test for this. We need those to prevent regressing the next time someone fixes things.

On Tue, Apr 23, 2024 at 2:38 PM Chuck Grindel @.***> wrote:

@.**** commented on this pull request.

In pkg/private/pkg_files.bzl https://github.com/bazelbuild/rules_pkg/pull/860#discussion_r1576729914:

@@ -436,7 +435,7 @@ def add_from_default_info( _check_dest(mapping_context.content_map, d_path, rf, src.label, mapping_context.allow_duplicates_with_different_content) mapping_context.content_map[d_path] = _DestFile( src = rf,

  • entry_type = ENTRY_IS_FILE,
  • entry_type = ENTRY_IS_DIR if rf.is_directory else ENTRY_IS_FILE,

Is there an example/test that we can add to ensure that this works?

— Reply to this email directly, view it on GitHub https://github.com/bazelbuild/rules_pkg/pull/860#pullrequestreview-2018032781, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXHHHEOAHB5HOZXZQ3WDITY62TBZAVCNFSM6AAAAABGTVFH6WVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMJYGAZTENZYGE . You are receiving this because your review was requested.Message ID: <bazelbuild/rules_pkg/pull/860/review/2018032781 @.*** .com>

ewianda commented 2 months ago

@aiuto @cgrindel I added a test case.