diff options
| author | Jan Garcia <j@n-garcia.com> | 2023-09-20 21:51:56 +0200 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-10-25 04:51:01 -1000 |
| commit | 592a3ed0ebc2bbe7d6a83b6cf69c1958d40f6132 (patch) | |
| tree | 95b5be663fe80450b69b881a450c78851c7acd60 /meta | |
| parent | e1bcc335a989b2ffcd77a76c332f5105f7083933 (diff) | |
| download | poky-592a3ed0ebc2bbe7d6a83b6cf69c1958d40f6132.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: 76efaa1e177a5051cfec87f288c8c7372f142fe2)
Signed-off-by: Jan Garcia <j@n-garcia.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d4ac66c5cdaf971fb717cc5c5bf9aa51a787d412)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes-global/insane.bbclass | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index ee34d5208d..e3a7d05ec3 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass | |||
| @@ -94,9 +94,8 @@ def package_qa_check_shebang_size(path, name, d, elf, messages): | |||
| 94 | return | 94 | return |
| 95 | 95 | ||
| 96 | if stanza.startswith(b'#!'): | 96 | if stanza.startswith(b'#!'): |
| 97 | #Shebang not found | ||
| 98 | try: | 97 | try: |
| 99 | stanza = stanza.decode("utf-8") | 98 | stanza.decode("utf-8") |
| 100 | except UnicodeDecodeError: | 99 | except UnicodeDecodeError: |
| 101 | #If it is not a text file, it is not a script | 100 | #If it is not a text file, it is not a script |
| 102 | return | 101 | return |
