-
Notifications
You must be signed in to change notification settings - Fork 50
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 link target generation for collection test #252
Fix link target generation for collection test #252
Conversation
0a62e0b
to
503408a
Compare
Can you add a unit test to cover the scenario? |
The issue can be seen with the ansible-freeipa collection on galaxy. For example with https://galaxy.ansible.com/ui/repo/published/freeipa/ansible_freeipa/?version=1.12.0 |
This issue affects quite a few community collections (many of the failures in https://ansible.softwarefactory-project.io/zuul/builds?job_name=ansible-galaxy-importer&skip=0 come from this bug). |
503408a
to
2975e77
Compare
I added test_valid_relative_symlink_in_subdir to tests/unit/test_collection_archive_extract.py |
Looks like this fixes the breaking CI I see in ansible-collections/community.vmware#1938 |
@jctanner Would it be possible to merge this and do a new release timely? I should say this bug has quite an impact... |
The link_target was generated only using the extract_dir and the linkname, but without the directory path that contains the link. Therefore the link_target could be outside of extract_dir. No-Issue Signed-off-by: Thomas Woerner <[email protected]>
2975e77
to
320bc28
Compare
Thanks @t-woerner and @jctanner for the quick fix! |
The link_target was generated only using the extract_dir and the linkname, but without the directory path that contains the link. Therefore the link_target could be outside of the extract_dir.