aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/minstall.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2020-08-20 10:13:43 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2020-08-20 23:47:54 +0300
commit86b47250c61bd373a3d28dd05a4a231564b1bfef (patch)
tree634a8a9ace6752a0e5190229a9f309c1361c8d45 /mesonbuild/minstall.py
parent1c403e20e70ac523216a31f977901fb815166b7a (diff)
downloadmeson-86b47250c61bd373a3d28dd05a4a231564b1bfef.zip
meson-86b47250c61bd373a3d28dd05a4a231564b1bfef.tar.gz
meson-86b47250c61bd373a3d28dd05a4a231564b1bfef.tar.bz2
simplify shutil usage by invoking copy2 where appropriate
It's equivalent to copyfile + copystat with the same arguments.
Diffstat (limited to 'mesonbuild/minstall.py')
-rw-r--r--mesonbuild/minstall.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
index 0be01fe..e6e973a 100644
--- a/mesonbuild/minstall.py
+++ b/mesonbuild/minstall.py
@@ -270,11 +270,9 @@ class Installer:
# Remove this entire branch when changing the behaviour to duplicate
# symlinks rather than copying what they point to.
print(symlink_warning)
- shutil.copyfile(from_file, to_file)
- shutil.copystat(from_file, to_file)
+ shutil.copy2(from_file, to_file)
else:
- shutil.copyfile(from_file, to_file)
- shutil.copystat(from_file, to_file)
+ shutil.copy2(from_file, to_file)
selinux_updates.append(to_file)
append_to_log(self.lf, to_file)
return True