[Scons-users] Change in Install behaviour: no longer makes target file writable after copying, causing build errors

Thomas Berg merlin66b at gmail.com
Sun Apr 11 16:02:23 EDT 2021


Hi,

After upgrading to SCons 4.X, I'm experiencing build failures in the
following use case:
- our scons build copies files from a read-only location
- whenever the source file changes, and scons copies the updated file, the
build now fails to overwrite the previously copied file, because it's now
read only

In earlier SCons versions, the copied file was always kept writable. We
were happy with this, and I think it makes more sense. So at least in our
case this is a regression.

Not sure if there are important use cases where you would want the writable
property to be propagated?

I checked the history and found
commit 0f3d4d1912b4d2378c989ea56a91ca2d4861d599, which removes an explicit
os.chmod call in SCons/Tool/install.py (in the copyFunc function). It
appears to be general code maintenance, rather than a bugfix. I believe
this is the cause, although I haven't verified it yet.

1. Would you agree this is a bug, and could we reinstate the old behaviour
making the target file writable when copying? At least optionally?
2. If not, is there a workaround? I would like to avoid the overhead of
adding additional chmod actions for tens of thousands of files that we are
copying this way...

Best regards,
Thomas Berg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20210411/0c9dd7e9/attachment.htm>


More information about the Scons-users mailing list