mirror of
https://gitlab.com/ita1024/waf.git
synced 2025-01-26 18:20:22 +01:00
78c9384e1c
A request such as: def build(bld): bld.install_files('/usr/share/foo/', bld.path.find_node('foo.txt'), chmod=0444) Will currently cause an IOError (especially on Windows) upon repeated requests to invoke 'waf install'. This is due to a wedged state in which the first 'waf intall' makes the destination file with 0444 permissions, but the OS (again, especially Windows) refuses to honor subsequent attempts to write the file as the current InstallContext.do_install() handles this attempt. This changeset adjusts InstallContext.do_install() so that its behavior is more similar to the familiar 'install' program used during an Autotools programs' "make install" phase. That is, we now explicitly attempt to temporarily adjust the permissions of the target file to include user-writability (0644) for the moment of overwrite. This has no observable effect on the end result; the last bit of InstallContext.do_install() forcibly resets the target file to the user's requested permission mask anyway. Signed-off-by: Thomas Nagy <tnagy2pow10@gmail.com>