diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-12-07 14:08:37 -0800 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-12-11 21:31:59 +0200 |
commit | 05d61b4c66ae87185087db114cde964823e9b603 (patch) | |
tree | 2ca7d3ca81b36664d3a4e753ad4a49cbf56af70a /mesonbuild/minstall.py | |
parent | bad383f6b3e8aba53e379caa122623e438d5a49d (diff) | |
download | meson-05d61b4c66ae87185087db114cde964823e9b603.zip meson-05d61b4c66ae87185087db114cde964823e9b603.tar.gz meson-05d61b4c66ae87185087db114cde964823e9b603.tar.bz2 |
install: Don't run ldconfig on cross builds
Even if we install without a DESTDIR set, we should never update
ldconfig when cross compiling.
Fixes #9707
Diffstat (limited to 'mesonbuild/minstall.py')
-rw-r--r-- | mesonbuild/minstall.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py index 60d533c..af847f7 100644 --- a/mesonbuild/minstall.py +++ b/mesonbuild/minstall.py @@ -383,9 +383,10 @@ class Installer: if not self.dry_run and not destdir: restore_selinux_contexts() - def apply_ldconfig(self, dm: DirMaker, destdir: str, libdir: str) -> None: - if not self.dry_run and not destdir: - apply_ldconfig(dm, libdir) + def apply_ldconfig(self, dm: DirMaker, destdir: str, is_cross_build: bool, libdir: str) -> None: + if any([self.dry_run, destdir, is_cross_build]): + return + apply_ldconfig(dm, libdir) def Popen_safe(self, *args: T.Any, **kwargs: T.Any) -> T.Tuple[int, str, str]: if not self.dry_run: @@ -589,7 +590,7 @@ class Installer: self.install_data(d, dm, destdir, fullprefix) self.install_symlinks(d, dm, destdir, fullprefix) self.restore_selinux_contexts(destdir) - self.apply_ldconfig(dm, destdir, libdir) + self.apply_ldconfig(dm, destdir, d.is_cross_build, libdir) self.run_install_script(d, destdir, fullprefix) if not self.did_install_something: self.log('Nothing to install.') |