target.mk: let profile remove from DEFAULT_PACKAGES
authorPhilip Prindeville <philipp@redfish-solutions.com>
Tue, 16 Jan 2018 22:46:44 +0000 (15:46 -0700)
committerJohn Crispin <john@phrozen.org>
Tue, 13 Feb 2018 12:02:03 +0000 (13:02 +0100)
In a profile, specifying -pkg in the list of PACKAGES will suppress
it even if it appears in the target's DEFAULT_PACKAGES list.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
include/target.mk

index 8ee197f1c46799331ca03e7e5eb27f11b5d3ae75..b84468997a3090b5e5865731662f9c99492c598d 100644 (file)
@@ -68,6 +68,8 @@ define Profile
   $(eval $(call ProfileDefault))
   $(eval $(call Profile/$(1)))
   dumpinfo : $(call shexport,Profile/$(1)/Description)
+  DEFAULT_PACKAGES := $(filter-out $(patsubst -%,%,$(filter -%,$(PACKAGES))),$(DEFAULT_PACKAGES))
+  PACKAGES := $(filter-out -%,$(PACKAGES))
   DUMPINFO += \
        echo "Target-Profile: $(1)"; \
        $(if $(PRIORITY), echo "Target-Profile-Priority: $(PRIORITY)"; ) \