summaryrefslogtreecommitdiffstats
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-07-25 15:11:46 +0100
commitbf3232255d5aac6d77a48fb81cd258978acaeb6b (patch)
tree5a1c7b6a6191078f67af52719fb16dfea8043274
parent4fd8f9b863ffa98feb48ceb63691781240099754 (diff)
downloadpoky-bf3232255d5aac6d77a48fb81cd258978acaeb6b.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: 1837c175d997ced1455537bb82fb86286711025c) 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>
-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):
444 Check for build paths inside target files and error if paths are not 444 Check for build paths inside target files and error if paths are not
445 explicitly ignored. 445 explicitly ignored.
446 """ 446 """
447 import stat
447 # Ignore .debug files, not interesting 448 # Ignore .debug files, not interesting
448 if path.find(".debug") != -1: 449 if path.find(".debug") != -1:
449 return 450 return
450 451
451 # Ignore symlinks 452 # Ignore symlinks/devs/fifos
452 if os.path.islink(path): 453 mode = os.lstat(path).st_mode
454 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):
453 return 455 return
454 456
455 tmpdir = bytes(d.getVar('TMPDIR'), encoding="utf-8") 457 tmpdir = bytes(d.getVar('TMPDIR'), encoding="utf-8")