1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 17:19:20 +00:00

insane: optimise test in package_qa_check_shebang_size

Check whether the elf is not None first, before doing os.stat() calls
on disk. Also don't check anything that isn't a file, not just FIFOs.

(From OE-Core rev: 38454a2675f38c7db55efcb67bbb8b9fef7e0bf1)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2024-10-10 17:06:21 +01:00
committed by Richard Purdie
parent 68e5aa9b92
commit c812b378e0
+1 -2
View File
@@ -82,8 +82,7 @@ def package_qa_clean_path(path, d, pkg=None):
QAPATHTEST[shebang-size] = "package_qa_check_shebang_size"
def package_qa_check_shebang_size(path, name, d, elf):
import stat
if os.path.islink(path) or stat.S_ISFIFO(os.stat(path).st_mode) or elf:
if elf or os.path.islink(path) or not os.path.isfile(path):
return
try: