diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-09-20 18:17:51 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-09-20 18:27:46 +0200 |
commit | 6681e4bb3dbbc6fbad5663055aff79483cb21b87 (patch) | |
tree | 4e89f1255edc546bb43f127b0ad0b91d1c304468 | |
parent | ea883a88bfe2e9bf0c2b532740bd433a910fb343 (diff) | |
download | build_make-6681e4bb3dbbc6fbad5663055aff79483cb21b87.tar.gz build_make-6681e4bb3dbbc6fbad5663055aff79483cb21b87.tar.bz2 build_make-6681e4bb3dbbc6fbad5663055aff79483cb21b87.zip |
Fix the generation of installable zips
It's a good idea not to not change too much the way to install
Replicant as otherwise:
- The installation instructions would need to be modified in
depth or rewritten completely for Replicant 11.
- Users that already know how to install Replicant will have
to learn new ways to do the installation if the previous
was isn't available anymore.
- Some non-official Replicant installation guides (typically
in local languages) also exist.
In addition it's really not a good idea to rely on heimdall
to flash images that are too big as on the Exynos devices that
we currently support in Replicant 6, you often need to retry
several times to talk to the bootloader, and under high load
on the computer running heimdall, it can fail in the middle
of the flashing of an image.
Howeve if we want to generate a zip file with ehtner 'make updatepackage'
and 'make otapackage' for the i9300 target we have an error like that:
2021-09-20 18:15:46 - add_img_to_target_files.py - INFO : done.
[100% 20/20] Package: out/target/product/i9300/replicant_i9300-img-eng.replicant.zip
FAILED: out/target/product/i9300/replicant_i9300-img-eng.replicant.zip
/bin/bash -c \
"PATH=[...] out/host/linux-x86/bin/img_from_target_files \
--additional \
IMAGES/VerifiedBootParams.textproto:VerifiedBootParams.textproto \
out/target/product/i9300/obj/PACKAGING/target_files_intermediates/replicant_i9300-target_files-eng.replicant.zip \
out/target/product/i9300/replicant_i9300-img-eng.replicant.zip"
Traceback (most recent call last):
File "[...]/out/host/linux-x86/bin/img_from_target_files/internal/stdlib/runpy.py", line 174, in _run_module_as_main
File "[...]/out/host/linux-x86/bin/img_from_target_files/internal/stdlib/runpy.py", line 72, in _run_code
File "[...]/out/host/linux-x86/bin/img_from_target_files/__main__.py", line 12, in <module>
File "[...]/out/host/linux-x86/bin/img_from_target_files/internal/stdlib/runpy.py", line 174, in _run_module_as_main
File "[...]/out/host/linux-x86/bin/img_from_target_files/internal/stdlib/runpy.py", line 72, in _run_code
File "[...]/out/host/linux-x86/bin/img_from_target_files/img_from_target_files.py", line 246, in <module>
File "[...]/out/host/linux-x86/bin/img_from_target_files/img_from_target_files.py", line 238, in main
File "[...]/out/host/linux-x86/bin/img_from_target_files/img_from_target_files.py", line 191, in ImgFromTargetFiles
File "[...]/out/host/linux-x86/bin/img_from_target_files/img_from_target_files.py", line 75, in LoadOptions
File "[...]/out/host/linux-x86/bin/img_from_target_files/common.py", line 688, in LoadInfoDict
File "[...]/out/host/linux-x86/bin/img_from_target_files/common.py", line 940, in _FindAndLoadRecoveryFstab
File "[...]/out/host/linux-x86/bin/img_from_target_files/common.py", line 859, in LoadRecoveryFSTab
File "[...]/out/host/linux-x86/bin/img_from_target_files/common.py", line 626, in read_helper
File "[...]/out/host/linux-x86/bin/img_from_target_files/common.py", line 578, in ReadFromInputFile
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 30: ordinal not in range(128)
18:16:31 ninja failed with: exit status 1
After some time spent debugging the issue with print(), it failed
with the RECOVERY/RAMDISK/system/etc/recovery.fstab file in the
replicant_i9300-target_files-eng.replicant/ directory in the
out/target/product/i9300/obj/PACKAGING/target_files_intermediates/
directory with both UTF-8 and POSIX locales set (it was
verified with locale -a).
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r-- | tools/releasetools/common.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index ae7da2fb64..33e70b1c8b 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -575,7 +575,7 @@ class BuildInfo(object): def ReadFromInputFile(input_file, fn): """Reads the contents of fn from input zipfile or directory.""" if isinstance(input_file, zipfile.ZipFile): - return input_file.read(fn).decode() + return input_file.read(fn).decode('utf-8') else: path = os.path.join(input_file, *fn.split("/")) try: |