diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-10-13 16:16:11 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-11-09 10:50:59 +0100 |
commit | 7a5eb6f9aaf70463978a749897ddf282832b38c1 (patch) | |
tree | 3fd768d5dd2881b295465c43229b822586c23bdf /mesonbuild/scripts | |
parent | c2f1d91b8ac8699e48283b4d36c0d1f2510b7586 (diff) | |
download | meson-7a5eb6f9aaf70463978a749897ddf282832b38c1.zip meson-7a5eb6f9aaf70463978a749897ddf282832b38c1.tar.gz meson-7a5eb6f9aaf70463978a749897ddf282832b38c1.tar.bz2 |
depfixer: always print the file name in messages
The messages are not useful unless we know what file they are about.
Diffstat (limited to 'mesonbuild/scripts')
-rw-r--r-- | mesonbuild/scripts/depfixer.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py index b86fed9..c89f081 100644 --- a/mesonbuild/scripts/depfixer.py +++ b/mesonbuild/scripts/depfixer.py @@ -313,17 +313,17 @@ class Elf(DataSizes): self.bf.seek(offset) self.bf.write(newname) - def fix_rpath(self, rpath_dirs_to_remove: T.Set[bytes], new_rpath: bytes) -> None: + def fix_rpath(self, fname: str, rpath_dirs_to_remove: T.Set[bytes], new_rpath: bytes) -> None: # The path to search for can be either rpath or runpath. # Fix both of them to be sure. - self.fix_rpathtype_entry(rpath_dirs_to_remove, new_rpath, DT_RPATH) - self.fix_rpathtype_entry(rpath_dirs_to_remove, new_rpath, DT_RUNPATH) + self.fix_rpathtype_entry(fname, rpath_dirs_to_remove, new_rpath, DT_RPATH) + self.fix_rpathtype_entry(fname, rpath_dirs_to_remove, new_rpath, DT_RUNPATH) - def fix_rpathtype_entry(self, rpath_dirs_to_remove: T.Set[bytes], new_rpath: bytes, entrynum: int) -> None: + def fix_rpathtype_entry(self, fname: str, rpath_dirs_to_remove: T.Set[bytes], new_rpath: bytes, entrynum: int) -> None: rp_off = self.get_entry_offset(entrynum) if rp_off is None: if self.verbose: - print('File does not have rpath. It should be a fully static executable.') + print(f'File {fname!r} does not have an rpath. It should be a fully static executable.') return self.bf.seek(rp_off) @@ -388,7 +388,7 @@ def fix_elf(fname: str, rpath_dirs_to_remove: T.Set[bytes], new_rpath: T.Optiona if new_rpath is not None: with Elf(fname, verbose) as e: # note: e.get_rpath() and e.get_runpath() may be useful - e.fix_rpath(rpath_dirs_to_remove, new_rpath) + e.fix_rpath(fname, rpath_dirs_to_remove, new_rpath) def get_darwin_rpaths_to_remove(fname: str) -> T.List[str]: out = subprocess.check_output(['otool', '-l', fname], |