From: Jan Garcia Date: Wed, 20 Sep 2023 19:51:56 +0000 (+0200) Subject: insane.bbclass: Count raw bytes in shebang-size X-Git-Tag: yocto-5.2~5111 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4ac66c5cdaf971fb717cc5c5bf9aa51a787d412;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Jan Garcia Signed-off-by: Richard Purdie --- diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index 2e537789347..5743d91240b 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): 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