This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sroracle
Recipients fruch, sroracle
Date 2018-04-19.02:54:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1524106471.37.0.682650639539.issue28627@psf.upfronthosting.co.za>
In-reply-to
Content
Actually the symlinks don't need to be broken. It fails for any kind of symlink
on musl.

$ ls -l /tmp/symtest
lrwxrwxrwx 1 mcrees mcrees 10 Apr 18 21:16 empty -> /var/empty
-rw-r--r-- 1 mcrees mcrees  0 Apr 18 21:16 regular
lrwxrwxrwx 1 mcrees mcrees 16 Apr 18 21:16 resolv.conf -> /etc/resolv.conf

$ python3
>>> import shutil; shutil.copytree('/tmp/symtest', '/tmp/symtest2', symlinks=True)
shutil.Error: [('/tmp/symtest/resolv.conf', '/tmp/symtest2/resolv.conf', "[Errno
95] Not supported: '/tmp/symtest2/resolv.conf'"), ('/tmp/symtest/empty',
'/tmp/symtest2/empty', "[Errno 95] Not supported: '/tmp/symtest2/empty'")]

$ ls -l /tmp/symtest2
total 0
lrwxrwxrwx 1 mcrees mcrees 10 Apr 18 21:16 empty -> /var/empty
-rw-r--r-- 1 mcrees mcrees  0 Apr 18 21:16 regular
lrwxrwxrwx 1 mcrees mcrees 16 Apr 18 21:16 resolv.conf -> /etc/resolv.conf

The implication of these bugs mean that things like pip may fail if it calls
shutil.copytree(..., symlinks=True) on a directory that contains symlinks(!)

Attached is a patch that works around the issue but does not address why chmod
is returning OSError instead of NotImplementedError.
History
Date User Action Args
2018-04-19 02:54:31sroraclesetrecipients: + sroracle, fruch
2018-04-19 02:54:31sroraclesetmessageid: <1524106471.37.0.682650639539.issue28627@psf.upfronthosting.co.za>
2018-04-19 02:54:31sroraclelinkissue28627 messages
2018-04-19 02:54:30sroraclecreate