diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2023-07-19 15:21:36 +1000 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-08-24 21:29:10 -0400 |
commit | 1bb29b1b329ec056c61a54070024b6b003cf5ca4 (patch) | |
tree | f1b8e0e481f288495c1fd3c62ad494beaae9ac00 /mesonbuild | |
parent | b4b1395ef5d2a625389902797816109c2e8340e3 (diff) | |
download | meson-1bb29b1b329ec056c61a54070024b6b003cf5ca4.zip meson-1bb29b1b329ec056c61a54070024b6b003cf5ca4.tar.gz meson-1bb29b1b329ec056c61a54070024b6b003cf5ca4.tar.bz2 |
minstall: move the "Installing foo to bar" message up
Move this message up before we attempt to change anything in the file
system (in this case creating the directory structure).
If an error occurs it will thus occur immediately after the message,
allowing us to debug what failed to install.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/minstall.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py index a9c561f..0d397b2 100644 --- a/mesonbuild/minstall.py +++ b/mesonbuild/minstall.py @@ -403,13 +403,15 @@ class Installer: append_to_log(self.lf, f'# Preserving old file {to_file}\n') self.preserved_file_count += 1 return False + self.log(f'Installing {from_file} to {outdir}') self.remove(to_file) - elif makedirs: - # Unpack tuple - dirmaker, outdir = makedirs - # Create dirs if needed - dirmaker.makedirs(outdir, exist_ok=True) - self.log(f'Installing {from_file} to {outdir}') + else: + self.log(f'Installing {from_file} to {outdir}') + if makedirs: + # Unpack tuple + dirmaker, outdir = makedirs + # Create dirs if needed + dirmaker.makedirs(outdir, exist_ok=True) if os.path.islink(from_file): if not os.path.exists(from_file): # Dangling symlink. Replicate as is. |