install-missing-packages installs all flavours

From: Daniel O'Connor <>
Date: Sat, 13 Aug 2022 03:41:01 UTC
I am building some lightly customised install media for work and am trying to avoid having to build all the packages myself (to save time) so normally I create a metaport with RUN_DEPENDS on all I want then run 'make install-missing-packages' to fetch all of the prebuilt packages.

This seemed to work fairly well until recently when I tried it, but now it pulls in all of the port flavours which obviously blows out the install size to a ridiculous degree.

For now I modified my install like so:

--- /usr/ports/Mk/      2022-08-12 09:33:02.669922000 +0000
+++ /usr/ports/Mk/   2022-08-12 09:33:03.553032000 +0000
@@ -4052,6 +4052,7 @@
@@ -4323,7 +4324,7 @@

 # Install missing dependencies from package
-       @_dirs=$$(${MISSING-DEPENDS-LIST}); \
+       @_dirs=$$(${MISSING-DEPENDS-FLAVOURS-LIST}); \
        ${ECHO_CMD} "$${_dirs}" | ${SED} "s%${PORTSDIR}/%%g" | \
                ${SU_CMD} "${XARGS} -o ${PKG_BIN} install -A"

Which works a lot better for my use case but I am not sure if it's a general solution or not (or if there should be a 'install-missing-package-flavours' target or something).

Curiously I still end up with Python 3.8 and 3.10 but I can't see where they are being pulled in. I ran this to calculate the deps:
(for i in $(make -V _UNIFIED_DEPENDS); do
echo "============ $i"
/usr/bin/env PORTSDIR="/usr/ports" dp_MAKE="make" dp_PKGNAME="gs-ports-minimal-1.0" dp_PKG_INFO="/usr/local/sbin/pkg-static info -g" dp_SCRIPTSDIR="/usr/ports/Mk/Scripts" dp_OVERLAYS="" /bin/sh /usr/ports/Mk/Scripts/ -f -m "$i"

(Ran in my meta port) 

However it only shows Python 3.9 (as I would expect) but 'make install-missing-packages' still pulls in 3.8 and 3.10. This isn't a big deal since just those ports are pretty small but it seems like a bug.


Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum