mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 00:32:14 +02:00
insane.bbclass: Count raw bytes in shebang-size
Operating systems limit the shebang to a maximum number of bytes. This patch makes the shebang-size check count raw bytes instead of UTF-8 characters. (From OE-Core rev: d4ac66c5cdaf971fb717cc5c5bf9aa51a787d412) Signed-off-by: Jan Garcia <j@n-garcia.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
3a5b23a5c3
commit
c94c1ba7c7
@@ -97,9 +97,8 @@ def package_qa_check_shebang_size(path, name, d, elf, messages):
|
||||
return
|
||||
|
||||
if stanza.startswith(b'#!'):
|
||||
#Shebang not found
|
||||
try:
|
||||
stanza = stanza.decode("utf-8")
|
||||
stanza.decode("utf-8")
|
||||
except UnicodeDecodeError:
|
||||
#If it is not a text file, it is not a script
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user