Re: Change in Install behaviour: no longer makes target file writable after copying, causing build errors
Thomas Berg <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <CABYiQpkzYL=u3XcCrZYEaNg0iG2=eHKP9vKADnGXxegfLNyHag@mail.gmail.com> |
Hi Mats, Thanks for responding. On Sun, 11 Apr 2021 at 23:10, Mats Wichmann <[email protected]> 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 _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users