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

Commit 378b7792 authored by Yi-Yo Chiang's avatar Yi-Yo Chiang Committed by Yo Chiang
Browse files

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
parent 90eeff54
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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)), \