Dereference symlinks when copying files.

The prebuilts are made available to the build via symlinks so be sure
dereference them.

Bug: 74835164
Test: `build_mixed gsi device dist` where device contained symlinks
Change-Id: I4d8139ec17405037f2764691d026c2f9ad42a3fb
This commit is contained in:
Michael Schwartz
2018-05-24 20:57:29 -07:00
parent 8429ee3cd5
commit bdb3f4f7de

View File

@@ -111,7 +111,8 @@ if [ -n "$DIST_DIR" ]; then
mkdir -p "$DIST_DIR" || true
fi
# Archive all the device artifacts.
rsync -av --exclude='logs' "$DEVICE_DIR"/* "$DIST_DIR"
rsync --archive --verbose --copy-links --exclude='logs' \
"$DEVICE_DIR"/* "$DIST_DIR"
# Overwrite the image archive with the Mixed Build archive.
OUT_ARCHIVE="$DIST_DIR"/"$(basename $DEVICE_ARCHIVE)"
cp "$DEVICE_IMAGES_DIR"/mixed.zip "$OUT_ARCHIVE"