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

Mats Wichmann mats at wichmann.us
Sun Apr 11 19:33:48 EDT 2021


On 4/11/21 2:02 PM, Thomas Berg wrote:
> 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?

See (and comment, if needed) https://github.com/SCons/scons/issues/3927


More information about the Scons-users mailing list