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

Commit 6d50ffff authored by Bill Peckham's avatar Bill Peckham Committed by Automerger Merge Worker
Browse files

Merge "Build merged apexkeys.txt/apkcerts.txt by partition." am: ad10b967...

Merge "Build merged apexkeys.txt/apkcerts.txt by partition." am: ad10b967 am: 3eb546a6 am: 5af467fb

Change-Id: I49014ceaa644f4c975f389a1b998eadc07baab2d
parents 402e840c 5af467fb
Loading
Loading
Loading
Loading
+12 −5
Original line number Original line Diff line number Diff line
@@ -863,10 +863,17 @@ endif
# -----------------------------------------------------------------
# -----------------------------------------------------------------
# Cert-to-package mapping.  Used by the post-build signing tools.
# Cert-to-package mapping.  Used by the post-build signing tools.
# Use a macro to add newline to each echo command
# Use a macro to add newline to each echo command
# $1 package name
# $2 certificate
# $3 private key
# $4 compressed
# $5 partition tag
# $6 output file
define _apkcerts_write_line
define _apkcerts_write_line
$(hide) echo -n 'name="$(1).apk" certificate="$2" private_key="$3"' >> $5
$(hide) echo -n 'name="$(1).apk" certificate="$2" private_key="$3"' >> $6
$(if $(4), $(hide) echo -n ' compressed="$4"' >> $5)
$(if $(4), $(hide) echo -n ' compressed="$4"' >> $6)
$(hide) echo '' >> $5
$(if $(5), $(hide) echo -n ' partition="$5"' >> $6)
$(hide) echo '' >> $6


endef
endef


@@ -886,8 +893,8 @@ $(APKCERTS_FILE):
	@rm -f $@
	@rm -f $@
	$(foreach p,$(sort $(PACKAGES)),\
	$(foreach p,$(sort $(PACKAGES)),\
	  $(if $(PACKAGES.$(p).EXTERNAL_KEY),\
	  $(if $(PACKAGES.$(p).EXTERNAL_KEY),\
	    $(call _apkcerts_write_line,$(p),"EXTERNAL","",$(PACKAGES.$(p).COMPRESSED),$@),\
	    $(call _apkcerts_write_line,$(p),"EXTERNAL","",$(PACKAGES.$(p).COMPRESSED),$(PACKAGES.$(p).PARTITION),$@),\
	    $(call _apkcerts_write_line,$(p),$(PACKAGES.$(p).CERTIFICATE),$(PACKAGES.$(p).PRIVATE_KEY),$(PACKAGES.$(p).COMPRESSED),$@)))
	    $(call _apkcerts_write_line,$(p),$(PACKAGES.$(p).CERTIFICATE),$(PACKAGES.$(p).PRIVATE_KEY),$(PACKAGES.$(p).COMPRESSED),$(PACKAGES.$(p).PARTITION),$@)))
	# In case value of PACKAGES is empty.
	# In case value of PACKAGES is empty.
	$(hide) touch $@
	$(hide) touch $@


+3 −0
Original line number Original line Diff line number Diff line
@@ -167,6 +167,9 @@ endif


include $(BUILD_SYSTEM)/app_certificate_validate.mk
include $(BUILD_SYSTEM)/app_certificate_validate.mk


# Set a actual_partition_tag (calculated in base_rules.mk) for the package.
PACKAGES.$(LOCAL_MODULE).PARTITION := $(actual_partition_tag)

# Disable dex-preopt of prebuilts to save space, if requested.
# Disable dex-preopt of prebuilts to save space, if requested.
ifndef LOCAL_DEX_PREOPT
ifndef LOCAL_DEX_PREOPT
ifeq ($(DONT_DEXPREOPT_PREBUILTS),true)
ifeq ($(DONT_DEXPREOPT_PREBUILTS),true)
+16 −0
Original line number Original line Diff line number Diff line
@@ -208,23 +208,39 @@ my_module_path := $(patsubst %/,%,$(my_module_path))
my_module_relative_path := $(strip $(LOCAL_MODULE_RELATIVE_PATH))
my_module_relative_path := $(strip $(LOCAL_MODULE_RELATIVE_PATH))
ifdef LOCAL_IS_HOST_MODULE
ifdef LOCAL_IS_HOST_MODULE
  partition_tag :=
  partition_tag :=
  actual_partition_tag :=
else
else
ifeq (true,$(strip $(LOCAL_VENDOR_MODULE)))
ifeq (true,$(strip $(LOCAL_VENDOR_MODULE)))
  partition_tag := _VENDOR
  partition_tag := _VENDOR
  # A vendor module could be on the vendor partition at "vendor" or the system
  # partition at "system/vendor".
  actual_partition_tag := $(if $(filter true,$(BOARD_USES_VENDORIMAGE)),vendor,system)
else ifeq (true,$(strip $(LOCAL_OEM_MODULE)))
else ifeq (true,$(strip $(LOCAL_OEM_MODULE)))
  partition_tag := _OEM
  partition_tag := _OEM
  actual_partition_tag := oem
else ifeq (true,$(strip $(LOCAL_ODM_MODULE)))
else ifeq (true,$(strip $(LOCAL_ODM_MODULE)))
  partition_tag := _ODM
  partition_tag := _ODM
  # An ODM module could be on the odm partition at "odm", the vendor partition
  # at "vendor/odm", or the system partition at "system/vendor/odm".
  actual_partition_tag := $(if $(filter true,$(BOARD_USES_ODMIMAGE)),odm,$(if $(filter true,$(BOARD_USES_VENDORIMAGE)),vendor,system))
else ifeq (true,$(strip $(LOCAL_PRODUCT_MODULE)))
else ifeq (true,$(strip $(LOCAL_PRODUCT_MODULE)))
  partition_tag := _PRODUCT
  partition_tag := _PRODUCT
  # A product module could be on the product partition at "product" or the
  # system partition at "system/product".
  actual_partition_tag := $(if $(filter true,$(BOARD_USES_PRODUCTIMAGE)),product,system)
else ifeq (true,$(strip $(LOCAL_SYSTEM_EXT_MODULE)))
else ifeq (true,$(strip $(LOCAL_SYSTEM_EXT_MODULE)))
  partition_tag := _SYSTEM_EXT
  partition_tag := _SYSTEM_EXT
  # A system_ext-specific module could be on the system_ext partition at
  # "system_ext" or the system partition at "system/system_ext".
  actual_partition_tag := $(if $(filter true,$(BOARD_USES_SYSTEM_EXTIMAGE)),system_ext,system)
else ifeq (NATIVE_TESTS,$(LOCAL_MODULE_CLASS))
else ifeq (NATIVE_TESTS,$(LOCAL_MODULE_CLASS))
  partition_tag := _DATA
  partition_tag := _DATA
  actual_partition_tag := data
else
else
  # The definition of should-install-to-system will be different depending
  # The definition of should-install-to-system will be different depending
  # on which goal (e.g., sdk or just droid) is being built.
  # on which goal (e.g., sdk or just droid) is being built.
  partition_tag := $(if $(call should-install-to-system,$(my_module_tags)),,_DATA)
  partition_tag := $(if $(call should-install-to-system,$(my_module_tags)),,_DATA)
  actual_partition_tag := $(if $(partition_tag),data,system)
endif
endif
endif
endif
# For test modules that lack a suite tag, set null-suite as the default.
# For test modules that lack a suite tag, set null-suite as the default.
+3 −0
Original line number Original line Diff line number Diff line
@@ -471,6 +471,9 @@ PACKAGES.$(LOCAL_PACKAGE_NAME).CERTIFICATE := $(certificate)
$(LOCAL_BUILT_MODULE): $(additional_certificates)
$(LOCAL_BUILT_MODULE): $(additional_certificates)
$(LOCAL_BUILT_MODULE): PRIVATE_ADDITIONAL_CERTIFICATES := $(additional_certificates)
$(LOCAL_BUILT_MODULE): PRIVATE_ADDITIONAL_CERTIFICATES := $(additional_certificates)


# Set a actual_partition_tag (calculated in base_rules.mk) for the package.
PACKAGES.$(LOCAL_PACKAGE_NAME).PARTITION := $(actual_partition_tag)

# Verify LOCAL_USES_LIBRARIES/LOCAL_OPTIONAL_USES_LIBRARIES
# Verify LOCAL_USES_LIBRARIES/LOCAL_OPTIONAL_USES_LIBRARIES
# If LOCAL_ENFORCE_USES_LIBRARIES is not set, default to true if either of LOCAL_USES_LIBRARIES or
# If LOCAL_ENFORCE_USES_LIBRARIES is not set, default to true if either of LOCAL_USES_LIBRARIES or
# LOCAL_OPTIONAL_USES_LIBRARIES are specified.
# LOCAL_OPTIONAL_USES_LIBRARIES are specified.
+3 −0
Original line number Original line Diff line number Diff line
@@ -157,6 +157,9 @@ endif
include $(BUILD_SYSTEM)/app_certificate_validate.mk
include $(BUILD_SYSTEM)/app_certificate_validate.mk
PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))
PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))


# Set a actual_partition_tag (calculated in base_rules.mk) for the package.
PACKAGES.$(LOCAL_MODULE).PARTITION := $(actual_partition_tag)

ifdef LOCAL_SOONG_BUNDLE
ifdef LOCAL_SOONG_BUNDLE
  ALL_MODULES.$(LOCAL_MODULE).BUNDLE := $(LOCAL_SOONG_BUNDLE)
  ALL_MODULES.$(LOCAL_MODULE).BUNDLE := $(LOCAL_SOONG_BUNDLE)
endif
endif
Loading