summaryrefslogtreecommitdiffstats
path: root/meta/classes-global/insane.bbclass
diff options
context:
space:
mode:
authorJan Garcia <j@n-garcia.com>2023-09-20 21:51:56 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-22 07:45:17 +0100
commitc94c1ba7c77b2f7c599b4c0f24bab0c3b07ab6d3 (patch)
tree60340f6ed479288d5491be3bb3b890a3d09af024 /meta/classes-global/insane.bbclass
parent3a5b23a5c302a392be5c1ff84ffff5a04a22a6e2 (diff)
downloadpoky-c94c1ba7c77b2f7c599b4c0f24bab0c3b07ab6d3.tar.gz
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>
Diffstat (limited to 'meta/classes-global/insane.bbclass')
-rw-r--r--meta/classes-global/insane.bbclass3
1 files changed, 1 insertions, 2 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index 2e53778934..5743d91240 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -97,9 +97,8 @@ def package_qa_check_shebang_size(path, name, d, elf, messages):
97 return 97 return
98 98
99 if stanza.startswith(b'#!'): 99 if stanza.startswith(b'#!'):
100 #Shebang not found
101 try: 100 try:
102 stanza = stanza.decode("utf-8") 101 stanza.decode("utf-8")
103 except UnicodeDecodeError: 102 except UnicodeDecodeError:
104 #If it is not a text file, it is not a script 103 #If it is not a text file, it is not a script
105 return 104 return