Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8621fee5 authored by Brian Chu's avatar Brian Chu Committed by Chris Sarbora
Browse files

recovery: Properly populate recovery/root on Darwin

`cp -R` is not a frequently used pattern in AOSP and has
interoperability problems between BSD cp and GNU cp.

First, the build is not resilient to old builds that did not complete,
since BSD cp does not overwrite by default when used recursively:

 Copying baseline ramdisk...
 cp: symlink: /sbin/healthd: File exists
 make: *** [/Volumes/code/client/out/target/product/hammerhead/ramdisk-recovery.img] Error 1
 make: *** Waiting for unfinished jobs....
 ...
 #### make failed to build some targets (06:57 (mm:ss)) ####

Second, BSD cp -R begins the source tree inside the specified source,
resulting in a broken recovery on a brand new build.

 $ uname -s
 Darwin
 $ cp -R root/ recovery
 $ ls recovery/root
 ls: recovery/root: No such file or directory

Change-Id: Ia47ac1ef2c25c7a9a34a587ce71e63dadb2b750c
parent c2a26235
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment