rules_pkg icon indicating copy to clipboard operation
rules_pkg copied to clipboard

fix: use appropriate entry type for runfiles that are directories

Open dieortin opened this issue 1 year ago • 1 comments

This fixes a regression at some point from 0.9.1 to 0.10.1, which caused pkg_tar to fail when include_runfiles was true and some of the sources had data dependencies that were directories.

The code that handles the include_runfiles attribute was always assigning ENTRY_IS_FILE as entry type of runfiles. This caused an error in the python code when packaging, as it encountered a directory in an unexpected place.

The fix is just considering ENTRY_IS_TREE types, in the same way as it is done in _process_pkg_files.

dieortin avatar Mar 13 '24 10:03 dieortin

As a side note: While this is better, it does not fully solve the problem. When the directory is linked, then is_directory will be false since links are files.

helly25 avatar Aug 02 '24 17:08 helly25