Merge "Deprecate LOCAL_MODULE_TAGS := eng/debug"

This commit is contained in:
Dan Willemsen 2019-01-31 18:32:16 +00:00 committed by Gerrit Code Review
commit a734907705
4 changed files with 32 additions and 7 deletions

View File

@ -1,5 +1,20 @@
# Build System Changes for Android.mk Writers
## `LOCAL_MODULE_TAGS := eng debug` deprecation {#LOCAL_MODULE_TAGS}
`LOCAL_MODULE_TAGS` value `eng` and `debug` are being deprecated. They allowed
modules to specify that they should always be installed on `-eng`, or `-eng`
and `-userdebug` builds. This conflicted with the ability for products to
specify which modules should be installed, effectively making it impossible to
build a stripped down product configuration that did not include those modules.
For the equivalent functionality, specify the modules in `PRODUCT_PACKAGES_ENG`
or `PRODUCT_PACKAGES_DEBUG` in the appropriate product makefiles.
Core android packages like `su` got added to the list in
`build/make/target/product/base_system.mk`, but for device-specific modules
there are often better base product makefiles to use instead.
## `USER` deprecation {#USER}
`USER` will soon be `nobody` in many cases due to the addition of a sandbox

View File

@ -162,6 +162,19 @@ ifneq ($(filter $(my_module_tags),user),)
$(error user tag detected on module.)
endif
my_bad_module_tags := $(filter eng debug,$(my_module_tags))
ifdef my_bad_module_tags
ifeq (true,$(LOCAL_UNINSTALLABLE_MODULE))
$(call pretty-warning,LOCAL_MODULE_TAGS := $(my_bad_module_tags) does not do anything for uninstallable modules)
endif
ifeq ($(BUILD_BROKEN_ENG_DEBUG_TAGS),false)
$(call pretty-error,LOCAL_MODULE_TAGS := $(my_bad_module_tags) is obsolete. See $(CHANGES_URL)#LOCAL_MODULE_TAGS)
else
$(call pretty-warning,LOCAL_MODULE_TAGS := $(my_bad_module_tags) is deprecated. See $(CHANGES_URL)#LOCAL_MODULE_TAGS)
endif
my_bad_module_tags :=
endif
# Only the tags mentioned in this test are expected to be set by module
# makefiles. Anything else is either a typo or a source of unexpected
# behaviors.

View File

@ -34,6 +34,7 @@ endif
# Mark variables deprecated/obsolete
CHANGES_URL := https://android.googlesource.com/platform/build/+/master/Changes.md
.KATI_READONLY := CHANGES_URL
$(KATI_obsolete_var PATH,Do not use PATH directly. See $(CHANGES_URL)#PATH)
$(KATI_obsolete_var PYTHONPATH,Do not use PYTHONPATH directly. See $(CHANGES_URL)#PYTHONPATH)
$(KATI_obsolete_var OUT,Use OUT_DIR instead. See $(CHANGES_URL)#OUT)
@ -95,8 +96,6 @@ $(KATI_deprecated_var USER,Use BUILD_USERNAME instead. See $(CHANGES_URL)#USER)
# This is marked as obsolete in envsetup.mk after reading the BoardConfig.mk
$(KATI_deprecate_export It is a global setting. See $(CHANGES_URL)#export_keyword)
CHANGES_URL :=
# Used to force goals to build. Only use for conditionally defined goals.
.PHONY: FORCE
FORCE:
@ -219,6 +218,7 @@ BUILD_BROKEN_ANDROIDMK_EXPORTS :=
BUILD_BROKEN_DUP_COPY_HEADERS :=
BUILD_BROKEN_DUP_RULES :=
BUILD_BROKEN_PHONY_TARGETS :=
BUILD_BROKEN_ENG_DEBUG_TAGS :=
# ###############################################################
# Include sub-configuration files

View File

@ -271,7 +271,8 @@ vars := \
BUILD_BROKEN_ANDROIDMK_EXPORTS \
BUILD_BROKEN_DUP_COPY_HEADERS \
BUILD_BROKEN_DUP_RULES \
BUILD_BROKEN_PHONY_TARGETS
BUILD_BROKEN_PHONY_TARGETS \
BUILD_BROKEN_ENG_DEBUG_TAGS
$(foreach var,$(vars),$(eval $(var) := $$(strip $$($(var)))))
@ -281,14 +282,10 @@ $(foreach var,$(vars), \
.KATI_READONLY := $(vars)
CHANGES_URL := https://android.googlesource.com/platform/build/+/master/Changes.md
ifneq ($(BUILD_BROKEN_ANDROIDMK_EXPORTS),true)
$(KATI_obsolete_export It is a global setting. See $(CHANGES_URL)#export_keyword)
endif
CHANGES_URL :=
###########################################
# Now we can substitute with the real value of TARGET_COPY_OUT_RAMDISK
ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)