Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use appropriate entry type for runfiles that are directories #830

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dieortin
Copy link
Contributor

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.

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`.
Copy link
Collaborator

@aiuto aiuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test for this case. This is something that should have been caught early. Without the test, someone is likely to break it again.

@helly25
Copy link

helly25 commented Aug 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants