Incorrect file names in apkcerts.txt for Make modules

This change fixes a regression that was caused by I56bc55e2231eb946617a9d6f97d55c9b61f3bff7
that file names for Make modules are ".apk" in apkcerts.txt.

This was because PACKAGES.$(LOCAL_MODULE).STEM was only set for the
modules from Soong. It is now set for Make modules too.

Bug: 155440232
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m apkcerts-list
and check the generated apkcerts txt file to see that it doesn't have an
entry where file name is ".apk"

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: I6f14bbb5678255bef2c1f2397f59ede6c2b5df18
(cherry picked from commit db64e3d528)
Change-Id: I6f14bbb5678255bef2c1f2397f59ede6c2b5df18
This commit is contained in:
Jiyong Park 2020-05-03 10:51:14 +09:00
parent 6b872d794b
commit 9314d8c77c
2 changed files with 12 additions and 0 deletions

View file

@ -172,6 +172,12 @@ else
$(built_module): PRIVATE_CERTIFICATE_LINEAGE := $(LOCAL_CERTIFICATE_LINEAGE)
endif
ifneq ($(LOCAL_MODULE_STEM),)
PACKAGES.$(LOCAL_MODULE).STEM := $(LOCAL_MODULE_STEM)
else
PACKAGES.$(LOCAL_MODULE).STEM := $(LOCAL_MODULE)
endif
include $(BUILD_SYSTEM)/app_certificate_validate.mk
# Set a actual_partition_tag (calculated in base_rules.mk) for the package.

View file

@ -694,6 +694,12 @@ endif # LOCAL_PACKAGE_SPLITS
PACKAGES.$(LOCAL_PACKAGE_NAME).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))
PACKAGES.$(LOCAL_PACKAGE_NAME).RESOURCE_FILES := $(all_resources)
ifneq ($(LOCAL_MODULE_STEM),)
PACKAGES.$(LOCAL_MODULE).STEM := $(LOCAL_MODULE_STEM)
else
PACKAGES.$(LOCAL_MODULE).STEM := $(LOCAL_MODULE)
endif
PACKAGES := $(PACKAGES) $(LOCAL_PACKAGE_NAME)
# Reset internal variables.