[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 17:48:55 EDT 2021
Hi Mats,
Thanks for responding.
On Sun, 11 Apr 2021 at 23:10, Mats Wichmann <mats at wichmann.us> wrote:
> I think in general copying likes to preserve reasonable bits of
> metadata, but one can argue what's "reasonable. The POSIXy behavior
> seems to agree with the current behavior you're seeing:
>
> $ touch X
> $ chmod 0444 X
> $ cp X Y
> $ cp X Y
> cp: cannot create regular file 'Y': Permission denied
>
> That doesn't mean it might not be reasonable to put it back to the
> earlier behavior...
>
>
Good example. cp does provide the "-f" flag for that use case though, so
instead of making the files writable on copy, another approach could be to
allow overwriting read-only files.
Being pragmatic, it seems reasonable to implement the behaviour that suits
scons users the best, rather than emulating exactly what posix functions
and tools do. I would prefer scons leaving built or copied files writable.
Configuring our build to silently overwrite write-protected files (like cp
-f) could be bad, and on several occasions I've been saved from
accidentally overwriting the wrong files by SCons refusing to do this.
I'll report an issue, and then it can be decided if something should be
done.
Thanks again,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20210411/4e2cd728/attachment.htm>
More information about the Scons-users
mailing list