mirror of https://github.com/ansible/ansible.git
unarchive - respect symlinks in archives
this patch fixes the extraction if symlinks are present in an archive but the symlinks don't exist in the target filesystem. tar reports this with: ``` /bin/tar: $filename: Warning: Cannot readlink: No such file or directory ``` previously, this was not matched against, hence the re-extraction was not triggered, although needed. additionally, setting permissions on that file later fails, leading to errors like: Unexpected error when accessing exploded file: `[Errno 2] No such file or directory: b'/path/to/$filename'` ``` File "payload.zip/ansible/modules/unarchive.py", line 901, in main File "payload.zip/ansible/module_utils/basic.py", line 1417, in set_fs_attributes_if_different file_args['path'], file_args['owner'], changed, diff, expand File "payload.zip/ansible/module_utils/basic.py", line 1058, in set_owner_if_different orig_uid, orig_gid = self.user_and_group(b_path, expand) File "payload.zip/ansible/module_utils/basic.py", line 952, in user_and_group st = os.lstat(b_path) ```pull/80136/head
parent
8fec2d2a82
commit
152cc34a1a
Loading…
Reference in New Issue