2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2025-01-26 18:20:22 +01:00
waf/waflib
Matt Hoosier 78c9384e1c
Improve support for BuildContext.install_*() to overwrite exiting files
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>
2014-06-29 22:25:16 +02:00
..
2011-09-10 11:13:51 +02:00
2014-06-08 17:34:35 +02:00
2014-05-17 00:11:34 +02:00
2011-09-10 11:13:51 +02:00
2012-05-19 09:45:57 +02:00
2014-04-20 02:29:27 +02:00
2014-05-19 21:32:24 +02:00
2014-01-04 11:04:59 +01:00
2014-05-19 21:32:24 +02:00