From 378b77929f12898c49a4adc18793cbfc620a4de3 Mon Sep 17 00:00:00 2001 From: Yi-Yo Chiang Date: Fri, 9 Apr 2021 20:09:13 +0800 Subject: [PATCH] Strip whitespace from INTERNAL_VENDOR_RAMDISK_FRAGMENTS aosp/1664081 introduces a bug where if BOARD_VENDOR_RAMDISK_FRAGMENTS is empty, then INTERNAL_VENDOR_RAMDISK_FRAGMENTS would become " " (single whitespace). Just unconditionally $(strip ...) the variable to remove any extra whitespace. Bug: 183395459 Test: m dist and check *-target_files-*.zip Change-Id: Ic842756f3a64c073593592d22c980820664e11c1 --- core/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/Makefile b/core/Makefile index fc9f64e2d..ce52b1b33 100644 --- a/core/Makefile +++ b/core/Makefile @@ -236,6 +236,10 @@ $(foreach vendor_ramdisk_fragment,$(BOARD_VENDOR_RAMDISK_FRAGMENTS), \ ) INTERNAL_VENDOR_RAMDISK_FRAGMENTS += $(BOARD_VENDOR_RAMDISK_FRAGMENTS) +# Strip the list in case of any whitespace. +INTERNAL_VENDOR_RAMDISK_FRAGMENTS := \ + $(strip $(INTERNAL_VENDOR_RAMDISK_FRAGMENTS)) + # Assign --ramdisk_name for each vendor ramdisk fragment. $(foreach vendor_ramdisk_fragment,$(INTERNAL_VENDOR_RAMDISK_FRAGMENTS), \ $(if $(filter --ramdisk_name,$(BOARD_VENDOR_RAMDISK_FRAGMENT.$(vendor_ramdisk_fragment).MKBOOTIMG_ARGS)), \