diff options
author | Ross Burton <ross.burton@arm.com> | 2024-04-30 13:57:16 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-02 15:11:06 +0100 |
commit | 3c3b0f7be4ca5d3826f4defe908c7758de353e54 (patch) | |
tree | 9f966b1540206a2044a0c6335b21ac80e5c8671b | |
parent | 221806f507cd5e18855e7aed3a21ef577fc28fdf (diff) | |
download | poky-3c3b0f7be4ca5d3826f4defe908c7758de353e54.tar.gz |
insane: handle dangling symlinks in the libdir QA check
The "libdir" QA check tries to open every file it finds as an ELF. If
it finds a dangling symlink that looks like a library by the filename it
will try to open it and fail with FileNotFoundError error. As this
dangling symlink probably points to a real file, silently absorb the
error.
[ YOCTO #13949 ]
(From OE-Core rev: f044290f98ea66f2cecfbffd7d392dbc3d986da9)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes-global/insane.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index e963001d09..c32dfffd83 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass | |||
@@ -298,7 +298,7 @@ def package_qa_check_libdir(d): | |||
298 | try: | 298 | try: |
299 | elf.open() | 299 | elf.open() |
300 | messages.append("%s: found library in wrong location: %s" % (package, rel_path)) | 300 | messages.append("%s: found library in wrong location: %s" % (package, rel_path)) |
301 | except (oe.qa.NotELFFileError): | 301 | except (oe.qa.NotELFFileError, FileNotFoundError): |
302 | pass | 302 | pass |
303 | if exec_re.match(rel_path): | 303 | if exec_re.match(rel_path): |
304 | if libdir not in rel_path and libexecdir not in rel_path: | 304 | if libdir not in rel_path and libexecdir not in rel_path: |
@@ -307,7 +307,7 @@ def package_qa_check_libdir(d): | |||
307 | try: | 307 | try: |
308 | elf.open() | 308 | elf.open() |
309 | messages.append("%s: found library in wrong location: %s" % (package, rel_path)) | 309 | messages.append("%s: found library in wrong location: %s" % (package, rel_path)) |
310 | except (oe.qa.NotELFFileError): | 310 | except (oe.qa.NotELFFileError, FileNotFoundError): |
311 | pass | 311 | pass |
312 | 312 | ||
313 | if messages: | 313 | if messages: |