Message372449
Here is a minimal test case:
==========================================================
#!/bin/bash
cd /tmp || exit 1
dir=test-copy_tree
src=$dir/src
dst=$dir/dst
mkdir -p "$src"
touch "$src"/file
ln -s file "$src/symlink"
python -c "from distutils.dir_util import copy_tree;
copy_tree('$src', '$dst', preserve_symlinks=1, update=1);
copy_tree('$src', '$dst', preserve_symlinks=1, update=1);"
rm -r "$dir"
==========================================================
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "/usr/lib/python3.8/distutils/dir_util.py", line 152, in copy_tree
os.symlink(link_dest, dst_name)
FileExistsError: [Errno 17] File exists: 'file' -> 'test-copy_tree/dst/symlink'
==========================================================
Related:
=========
This issue will likely be resolved via:
bpo-36656 Add race-free os.link and os.symlink wrapper / helper
https://bugs.python.org/issue36656
(WIP under discussion at python-mentor)
Prior art:
===========
https://stackoverflow.com/questions/53090360/python-distutils-copy-tree-fails-to-update-if-there-are-symlinks |
|
Date |
User |
Action |
Args |
2020-06-27 03:26:02 | Tom Hale | set | recipients:
+ Tom Hale |
2020-06-27 03:26:02 | Tom Hale | set | messageid: <1593228362.42.0.387933635808.issue41134@roundup.psfhosted.org> |
2020-06-27 03:26:02 | Tom Hale | link | issue41134 messages |
2020-06-27 03:26:02 | Tom Hale | create | |
|