]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.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)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 4 Jul 2022 14:13:18 +0000 (15:13 +0100)
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>
meta/classes/insane.bbclass

index e6b0f081e61e3eb0a1d47009eed5898fd103da88..eaacae6cb10f40d614af1f198cea6e08b8550a2a 100644 (file)
@@ -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")