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

Commit 1b224289 authored by Jaekyun Seok's avatar Jaekyun Seok
Browse files

Use product-based inclusive rule for enforcing RRO

Board-based rule can cause unexpected regression because build-time overlays
are different among products. So each product should be tested with its own
product-based rule considering its build-time overlays before applying
enforcing RRO.

Additionally RRO conversion is mandatory only for overlays of which target is
included in AOSP system image and is critical for CTS/VTS tests with AOSP
system image. So inclusive rule is more suitable instead of exclusive rule
to avoid unexpected regression due to unnecessary RRO conversion.

Note that we still support conversion for all the overlays by specifying
PRODUCT_ENFORCE_RRO_TARGETS as "*".

Test: building succeeded and tested with auto-generated RROs.
Bug: 36231603
Change-Id: I8e1d701d4f78b818c89ef3e7638110105370c5bc
(cherry picked from commit 2a209997)
parent 41febee0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -497,7 +497,7 @@ ADDITIONAL_DEFAULT_PROPERTIES := $(strip $(ADDITIONAL_DEFAULT_PROPERTIES))
ADDITIONAL_BUILD_PROPERTIES := $(strip $(ADDITIONAL_BUILD_PROPERTIES))
.KATI_READONLY := ADDITIONAL_BUILD_PROPERTIES

ifeq ($(BOARD_ENFORCE_RRO),true)
ifneq ($(PRODUCT_ENFORCE_RRO_TARGETS),)
ENFORCE_RRO_SOURCES :=
endif

@@ -571,7 +571,7 @@ endif # ONE_SHOT_MAKEFILE
# Enforce to generate all RRO packages for modules having resource
# overlays.
# -------------------------------------------------------------------
ifeq ($(BOARD_ENFORCE_RRO),true)
ifneq ($(PRODUCT_ENFORCE_RRO_TARGETS),)
$(call generate_all_enforce_rro_packages)
endif

+6 −4
Original line number Diff line number Diff line
@@ -101,9 +101,11 @@ package_resource_overlays := $(strip \
      $(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR)))))

enforce_rro_enabled :=
ifeq ($(BOARD_ENFORCE_RRO),true)
  ifeq (,$(filter $(LOCAL_PACKAGE_NAME), $(BOARD_ENFORCE_RRO_EXEMPT_SOURCES)))
ifneq ($(PRODUCT_ENFORCE_RRO_TARGETS),)
  ifneq ($(package_resource_overlays),)
    ifeq ($(PRODUCT_ENFORCE_RRO_TARGETS),*)
      enforce_rro_enabled := true
    else ifneq (,$(filter $(LOCAL_PACKAGE_NAME), $(PRODUCT_ENFORCE_RRO_TARGETS)))
      enforce_rro_enabled := true
    endif
  endif
+1 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ _product_var_list := \
    PRODUCT_EXTRA_RECOVERY_KEYS \
    PRODUCT_PACKAGE_OVERLAYS \
    DEVICE_PACKAGE_OVERLAYS \
    PRODUCT_ENFORCE_RRO_TARGETS \
    PRODUCT_SDK_ATREE_FILES \
    PRODUCT_SDK_ADDON_NAME \
    PRODUCT_SDK_ADDON_COPY_FILES \
+4 −0
Original line number Diff line number Diff line
@@ -424,3 +424,7 @@ PRODUCT_ART_USE_READ_BARRIER := \
# Whether the product is an Android Things variant.
PRODUCT_IOT := \
    $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_IOT))

# Package list to apply enforcing RRO.
PRODUCT_ENFORCE_RRO_TARGETS := \
    $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ENFORCE_RRO_TARGETS))