diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2022-01-12 11:47:57 -0500 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2022-03-07 09:27:02 -0500 |
commit | 01e92dc543fb7443fba8a33687ffd726f11433e8 (patch) | |
tree | 6d5bc574ff198d35aae363baab191f759cbceac6 /mesonbuild/minstall.py | |
parent | 219f40c1e4689060f3c299edd463fc5f5a625608 (diff) | |
download | meson-01e92dc543fb7443fba8a33687ffd726f11433e8.zip meson-01e92dc543fb7443fba8a33687ffd726f11433e8.tar.gz meson-01e92dc543fb7443fba8a33687ffd726f11433e8.tar.bz2 |
Fix default install tag for shared lib symlinks
Versioned shared libraries should have .so file in devel, .so.1 and
.so.1.2.3 in runtime.
Fixes: #9811
Diffstat (limited to 'mesonbuild/minstall.py')
-rw-r--r-- | mesonbuild/minstall.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py index 80b0239..b51d4f0 100644 --- a/mesonbuild/minstall.py +++ b/mesonbuild/minstall.py @@ -428,11 +428,11 @@ class Installer: append_to_log(self.lf, to_file) return True - def do_symlink(self, target: str, link: str, full_dst_dir: str) -> bool: + def do_symlink(self, target: str, link: str, full_dst_dir: str, allow_missing: bool) -> bool: abs_target = target if not os.path.isabs(target): abs_target = os.path.join(full_dst_dir, target) - if not os.path.exists(abs_target): + if not os.path.exists(abs_target) and not allow_missing: raise MesonException(f'Tried to install symlink to missing file {abs_target}') if os.path.exists(link): if not os.path.islink(link): @@ -592,7 +592,7 @@ class Installer: full_dst_dir = get_destdir_path(destdir, fullprefix, s.install_path) full_link_name = get_destdir_path(destdir, fullprefix, s.name) dm.makedirs(full_dst_dir, exist_ok=True) - if self.do_symlink(s.target, full_link_name, full_dst_dir): + if self.do_symlink(s.target, full_link_name, full_dst_dir, s.allow_missing): self.did_install_something = True def install_man(self, d: InstallData, dm: DirMaker, destdir: str, fullprefix: str) -> None: @@ -676,7 +676,6 @@ class Installer: outdir = get_destdir_path(destdir, fullprefix, t.outdir) outname = os.path.join(outdir, os.path.basename(fname)) final_path = os.path.join(d.prefix, t.outdir, os.path.basename(fname)) - aliases = t.aliases should_strip = t.strip install_rpath = t.install_rpath install_name_mappings = t.install_name_mappings @@ -711,9 +710,6 @@ class Installer: self.do_copydir(d, fname, outname, None, install_mode, dm) else: raise RuntimeError(f'Unknown file type for {fname!r}') - for alias, target in aliases.items(): - symlinkfilename = os.path.join(outdir, alias) - self.do_symlink(target, symlinkfilename, outdir) if file_copied: self.did_install_something = True try: |