core: sort packages and eliminate duplicates in show-targets
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 12 Nov 2017 17:45:39 +0000 (18:45 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 30 Nov 2017 10:40:43 +0000 (11:40 +0100)
Currently, enabling more than one filesystem image will make
'show-targets' list a few host packages more than once.

This is because all filesystem images add the same set of
host-packages to their dependencies, which are then added as-is
to the package list.

Thus, host-fakeroot, host-makedevs and, if needed, host-mkpasswd will
appear as many times as there are filesystem images enabled.

Fix that by sorting the package list, thus eliminating duplicates from
that list. Also sort the rootfs list for good measure. Sort the two
separately, so that rootfses are last.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Makefile

index ef10c904896df3558ca75bd159fe8ff51d7cbbe5..d52852153f20592505f5f0f3d2f42efdec39b359 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -793,7 +793,7 @@ legal-info: dirs legal-info-clean legal-info-prepare $(foreach p,$(PACKAGES),$(p
 
 .PHONY: show-targets
 show-targets:
-       @echo $(PACKAGES) $(TARGETS_ROOTFS)
+       @echo $(sort $(PACKAGES)) $(sort $(TARGETS_ROOTFS))
 
 .PHONY: show-build-order
 show-build-order: $(patsubst %,%-show-build-order,$(PACKAGES))