Merge "Remove the obsolete location check for install-recovery.sh"
am: 8fb65a5d63
Change-Id: Ibc02c20dcd47232fe31f2b543e3a3ae996fdbb33
This commit is contained in:
commit
ea5dad9010
1 changed files with 2 additions and 25 deletions
|
@ -1605,7 +1605,6 @@ def MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img,
|
|||
info_dict = OPTIONS.info_dict
|
||||
|
||||
full_recovery_image = info_dict.get("full_recovery_image", None) == "true"
|
||||
system_root_image = info_dict.get("system_root_image", None) == "true"
|
||||
|
||||
if full_recovery_image:
|
||||
output_sink("etc/recovery.img", recovery_img.data)
|
||||
|
@ -1661,30 +1660,8 @@ fi
|
|||
'bonus_args': bonus_args}
|
||||
|
||||
# The install script location moved from /system/etc to /system/bin
|
||||
# in the L release. Parse init.*.rc files to find out where the
|
||||
# target-files expects it to be, and put it there.
|
||||
sh_location = "etc/install-recovery.sh"
|
||||
found = False
|
||||
if system_root_image:
|
||||
init_rc_dir = os.path.join(input_dir, "ROOT")
|
||||
else:
|
||||
init_rc_dir = os.path.join(input_dir, "BOOT", "RAMDISK")
|
||||
init_rc_files = os.listdir(init_rc_dir)
|
||||
for init_rc_file in init_rc_files:
|
||||
if (not init_rc_file.startswith('init.') or
|
||||
not init_rc_file.endswith('.rc')):
|
||||
continue
|
||||
|
||||
with open(os.path.join(init_rc_dir, init_rc_file)) as f:
|
||||
for line in f:
|
||||
m = re.match(r"^service flash_recovery /system/(\S+)\s*$", line)
|
||||
if m:
|
||||
sh_location = m.group(1)
|
||||
found = True
|
||||
break
|
||||
|
||||
if found:
|
||||
break
|
||||
# in the L release.
|
||||
sh_location = "bin/install-recovery.sh"
|
||||
|
||||
print("putting script in", sh_location)
|
||||
|
||||
|
|
Loading…
Reference in a new issue