summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2018-11-20 11:04:01 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2018-11-20 22:51:31 +0200
commit4178267bfef82a6ebf35dc353bb7915c2d3fda94 (patch)
treeb0152298dc5d5e87e8c6ddc1fb1b9303afb0e340
parente78fd7e8c55edcaf2b63f44990efd4dbec20f9c0 (diff)
downloadmeson-4178267bfef82a6ebf35dc353bb7915c2d3fda94.tar.gz
minstall: Do not delete dst files when installing a directory
do_copyfile() already takes the decision to delete or preserve them. Also do not append a confusing '.' in log messages that finish by a file path.
-rw-r--r--mesonbuild/minstall.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
index fc250575f..8ac6aab1d 100644
--- a/mesonbuild/minstall.py
+++ b/mesonbuild/minstall.py
@@ -238,7 +238,7 @@ class Installer:
'a file'.format(to_file))
if self.should_preserve_existing_file(from_file, to_file):
append_to_log(self.lf, '# Preserving old file %s\n' % to_file)
- print('Preserving existing file %s.' % to_file)
+ print('Preserving existing file %s' % to_file)
return False
os.remove(to_file)
print('Installing %s to %s' % (from_file, outdir))
@@ -316,8 +316,6 @@ class Installer:
abs_dst = os.path.join(dst_dir, filepart)
if os.path.isdir(abs_dst):
print('Tried to copy file %s but a directory of that name already exists.' % abs_dst)
- if os.path.exists(abs_dst):
- os.remove(abs_dst)
parent_dir = os.path.dirname(abs_dst)
if not os.path.isdir(parent_dir):
os.mkdir(parent_dir)