]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
insane: Fix buildpaths test to work with special devices
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 2 Jul 2022 12:16:26 +0000 (13:16 +0100)
committerSteve Sakoman <steve@sakoman.com>
Wed, 10 Aug 2022 15:04:10 +0000 (05:04 -1000)
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>
meta/classes/insane.bbclass

index 77a2039738f2564285dd737af5ba2d033ee551c8..d6da53252f25dc4b64ac5921dbbcc7a255f2302b 100644 (file)
@@ -452,12 +452,14 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
     """
     Check for build paths inside target files and error if not found in the whitelist
     """
+    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")