diff options
author | Martin Blumenstingl <martin.blumenstingl@googlemail.com> | 2016-03-06 22:06:28 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-03-08 23:29:33 -0800 |
commit | ad12b369afca4b6b3764ad0a70778c0a924cdc68 (patch) | |
tree | 4e77895f2ddea74e940329bed9ed40dc15d19fc7 /target | |
parent | 55d80653b950b21c974999595be4f80cf7e82229 (diff) | |
download | build-ad12b369afca4b6b3764ad0a70778c0a924cdc68.zip build-ad12b369afca4b6b3764ad0a70778c0a924cdc68.tar.gz build-ad12b369afca4b6b3764ad0a70778c0a924cdc68.tar.bz2 |
Fix a race condition while building the recovery patch
RECOVERY_PATCH_INSTALL has a dependency on RECOVERY_FROM_BOOT_PATCH.
This is correct, because RECOVERY_PATCH_INSTALL uses make_recovery_patch
which needs the imgdiff tool. imgdiff on the other hand is a dependency
of RECOVERY_FROM_BOOT_PATCH. This should ensure that all dependencies
are met.
However, RECOVERY_FROM_BOOT_PATCH is defined after
RECOVERY_PATCH_INSTALL, making the dependency effectively non-existant.
Moving RECOVERY_FROM_BOOT_PATCH before RECOVERY_PATCH_INSTALL fixes a
race-condition where sometimes imgdiff was not build before
RECOVERY_PATCH_INSTALL is called.
Upstream is not affected by this bug, since it does not contain
RECOVERY_PATCH_INSTALL anymore.
The following error can be observed whenever someone hits this race
condition (which is basically always reproducible when building with
-j1):
Installing recovery patch to system partition
Warning: could not find SYSTEM/build.prop in <built-in function zip>
using prebuilt recovery.img from BOOTABLE_IMAGES...
using prebuilt boot.img from BOOTABLE_IMAGES...
Traceback (most recent call last):
File "./build/tools/releasetools/make_recovery_patch", line 55, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/make_recovery_patch", line 51, in main
common.MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img)
File "build/tools/releasetools/common.py", line 1461, in MakeRecoveryPatch
_, _, patch = d.ComputePatch()
File "build/tools/releasetools/common.py", line 1146, in ComputePatch
p = Run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "build/tools/releasetools/common.py", line 100, in Run
return subprocess.Popen(args, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
build/core/Makefile:1047: recipe for target
'out/target/product/t00n/system/bin/install-recovery.sh' failed
Fixes: 3d1c612e5c82 ("Revert "Revert "core: Makefile: Build
install-recovery into the system image""")
Change-Id: I28e8c845ffc830553ca5177cbe22ae72b185b437
Diffstat (limited to 'target')
0 files changed, 0 insertions, 0 deletions