forked from openkylin/platform_build
change incremental OTA file install order
(Cherry-pick from donut.) Delete the old recovery-from-boot patch before patching system files, then install the new one at the end of the process. Also fix an issue with applypatch returning the wrong status. Change-Id: I614fce39f307eded696ba792912b863f9fb0580b
This commit is contained in:
parent
e3265fb743
commit
42265390d9
|
@ -839,7 +839,7 @@ int applypatch(int argc, char** argv) {
|
|||
if (result != 0) {
|
||||
if (retry == 0) {
|
||||
printf("applying patch failed\n");
|
||||
return result;
|
||||
return result != 0;
|
||||
} else {
|
||||
printf("applying patch failed; retrying\n");
|
||||
}
|
||||
|
|
|
@ -751,7 +751,8 @@ def WriteIncrementalOTAPackage(target_zip, source_zip, output_zip):
|
|||
# as fodder for constructing the recovery image.
|
||||
recovery_sh_item = MakeRecoveryPatch(output_zip,
|
||||
target_recovery, target_boot)
|
||||
script.UnpackPackageDir("recovery", "/system")
|
||||
script.DeleteFiles(["/system/recovery-from-boot.p",
|
||||
"/system/etc/install-recovery.sh"])
|
||||
print "recovery image changed; including as patch from boot."
|
||||
else:
|
||||
print "recovery image unchanged; skipping."
|
||||
|
@ -787,6 +788,10 @@ def WriteIncrementalOTAPackage(target_zip, source_zip, output_zip):
|
|||
script.Print("Unpacking new files...")
|
||||
script.UnpackPackageDir("system", "/system")
|
||||
|
||||
if updating_recovery:
|
||||
script.Print("Unpacking new recovery...")
|
||||
script.UnpackPackageDir("recovery", "/system")
|
||||
|
||||
script.Print("Symlinks and permissions...")
|
||||
|
||||
# Create all the symlinks that don't already exist, or point to
|
||||
|
|
Loading…
Reference in New Issue