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
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-18 17:52:23 +0100
commit354f571f614564350cb60fbfb41b4dfa8f95fc91 (patch)
tree9280867beb310f62d5ca4ae2e4251e8462811108 /meta/classes/insane.bbclass
parent883102b9b8bcb8d69dbb709bf7e5ef7cabe21233 (diff)
downloadpoky-354f571f614564350cb60fbfb41b4dfa8f95fc91.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. (From OE-Core rev: 0106c6a629d0a9f07d76ffaad2dc92e48021e1b0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2567edb7e0a8c5ca9a88d6940491bf33bfe0eff9) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 77a2039738..d6da53252f 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -452,12 +452,14 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
452 """ 452 """
453 Check for build paths inside target files and error if not found in the whitelist 453 Check for build paths inside target files and error if not found in the whitelist
454 """ 454 """
455 import stat
455 # Ignore .debug files, not interesting 456 # Ignore .debug files, not interesting
456 if path.find(".debug") != -1: 457 if path.find(".debug") != -1:
457 return 458 return
458 459
459 # Ignore symlinks 460 # Ignore symlinks/devs/fifos
460 if os.path.islink(path): 461 mode = os.lstat(path).st_mode
462 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):
461 return 463 return
462 464
463 tmpdir = bytes(d.getVar('TMPDIR'), encoding="utf-8") 465 tmpdir = bytes(d.getVar('TMPDIR'), encoding="utf-8")