diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2018-11-20 11:04:01 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-11-20 22:51:31 +0200 |
commit | 4178267bfef82a6ebf35dc353bb7915c2d3fda94 (patch) | |
tree | b0152298dc5d5e87e8c6ddc1fb1b9303afb0e340 /mesonbuild | |
parent | e78fd7e8c55edcaf2b63f44990efd4dbec20f9c0 (diff) | |
download | meson-4178267bfef82a6ebf35dc353bb7915c2d3fda94.zip meson-4178267bfef82a6ebf35dc353bb7915c2d3fda94.tar.gz meson-4178267bfef82a6ebf35dc353bb7915c2d3fda94.tar.bz2 |
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.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/minstall.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py index fc25057..8ac6aab 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) |