summaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-02 13:16:26 +0100
committerSteve Sakoman <steve@sakoman.com>2022-07-17 16:59:57 -1000
commit1837c175d997ced1455537bb82fb86286711025c (patch)
treec88e001abcb92f78045e0c71999fa3c69ac24bd2 /meta/classes/insane.bbclass
parent8efd5e31670235f7c59af2a5ee14646f029f4d18 (diff)
downloadopenembedded-core-contrib-1837c175d997ced1455537bb82fb86286711025c.tar.gz
insane: Fix buildpaths test to work with special devices
If enabled, the buildpaths test hangs in psplash as it tries to open a fifo and read from it, hanging indefinitely. Tweak the test to ignore fifo/socket/device files. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2567edb7e0a8c5ca9a88d6940491bf33bfe0eff9) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r--meta/classes/insane.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 6f6dcb3dd5..f3f80334f6 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -444,12 +444,14 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
Check for build paths inside target files and error if paths are not
explicitly ignored.
"""
+ import stat
# Ignore .debug files, not interesting
if path.find(".debug") != -1:
return
- # Ignore symlinks
- if os.path.islink(path):
+ # Ignore symlinks/devs/fifos
+ mode = os.lstat(path).st_mode
+ if stat.S_ISLNK(mode) or stat.S_ISBLK(mode) or stat.S_ISFIFO(mode) or stat.S_ISCHR(mode) or stat.S_ISSOCK(mode):
return
tmpdir = bytes(d.getVar('TMPDIR'), encoding="utf-8")