Changes between Initial Version and Version 1 of Ticket #38986


Ignore:
Timestamp:
May 2, 2013, 7:27:50 PM (11 years ago)
Author:
ryandesign (Ryan Carsten Schmidt)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #38986

    • Property Owner changed from macports-tickets@… to jwa@…
    • Property Keywords errno shutils removed
  • Ticket #38986 – Description

    initial v1  
    55The EOPNOTSUPP vs ENOTSUP distinction also breaks copystat routine in shutils module when run on Mac OS X. Shutils contains this code that makes all chflags operation errors to be ignored if underlying OS does not support them:
    66
     7{{{
    78            if (not hasattr(errno, 'EOPNOTSUPP') or
    89                why.errno != errno.EOPNOTSUPP):
    910                raise
     11}}}
    1012
    1113In reality, when the file system (say, NFS) does not support file flags, it returns the value of 45 in errno, which corresponds to ENOTSUP. The code used to work when ENOTSUP and EOPNOTSUPP were mapped to the same value, but is ineffective now. It cannot be fixed trivially either because errno.ENOTSUP is not present in errno module, as per above. I suggest the patch be committed to python port to 1. make sure errno.ENOTSUP is always defined, and, 2. shutils are adjusted to use errno.ENOTSUPP in the above chflags workaround. I'll see about submitting the patch to upstream, if it is still needed, but would really like so see the workaround in the port meanwhile. Without it one cannot use tools like scons on NFS mounted source trees - scons uses shutils to to the file copying and installation and it trips over chflags errors from NFS right away.