From nobody Sat Aug 13 03:41:01 2022 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M4RFC4gJkz4Z0SL for ; Sat, 13 Aug 2022 03:42:23 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net [IPv6:2403:5800:5200:4700:225:90ff:fe47:39b4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "dons.net.au", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M4RF83Wl0z3gjW for ; Sat, 13 Aug 2022 03:42:19 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.17.1/8.16.1) with ESMTPS id 27D3ffI1004820 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Sat, 13 Aug 2022 13:11:45 +0930 (ACST) (envelope-from darius@dons.net.au) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dons.net.au; s=default; t=1660362109; bh=xYXM7i4wbfjE/xA5CB2iYc9pjKBODKKQN0Mhgk2f+BU=; h=From:Date:Subject:To; b=ouxcwmp/zo3Ld6yu0OMz6+tHI+ZaROafSnZWQdLvc1xfrKs+S6SizBHNYBI+NV0sr 1ViUldo5wy6AIFoLkv0wF4TyQizE9APBkl+NqyzBACvUvzlGlgJtf56gGei8mfRQbH q8y4U6idSfmStxRSQg0RVrXWcqgO1/YLVlH2A6J0= Received: (from mailnull@localhost) by midget.dons.net.au (8.17.1/8.16.1/Submit) id 27D3fCNh004803 for ; Sat, 13 Aug 2022 13:11:12 +0930 (ACST) (envelope-from darius@dons.net.au) X-MIMEDefang-Relay-a1a524833438212bf543e143edafb27bc4d2c346: 2403:5800:5200:4700:3453:61c4:4eda:5405 Received: from smtpclient.apple ([IPv6:2403:5800:5200:4700:3453:61c4:4eda:5405] [2403:5800:5200:4700:3453:61c4:4eda:5405]) by 2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net (envelope-sender ) (MIMEDefang) with ESMTP id 27D3fBgu004794; Sat, 13 Aug 2022 13:11:11 +0930 From: "Daniel O'Connor" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Date: Sat, 13 Aug 2022 13:11:01 +0930 Subject: install-missing-packages installs all flavours Message-Id: To: "freebsd-ports@freebsd.org" X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: 1.3 (*) No, score=1.3 required=5.0 tests=RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.5 X-Scanned-By: MIMEDefang 2.84 on 10.0.2.1 X-Rspamd-Queue-Id: 4M4RF83Wl0z3gjW X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=dons.net.au header.s=default header.b="ouxcwmp/"; dmarc=pass (policy=quarantine) header.from=dons.net.au; spf=pass (mx1.freebsd.org: domain of darius@dons.net.au designates 2403:5800:5200:4700:225:90ff:fe47:39b4 as permitted sender) smtp.mailfrom=darius@dons.net.au X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[dons.net.au,quarantine]; R_DKIM_ALLOW(-0.20)[dons.net.au:s=default]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_EQ_ADDR_ALL(0.00)[]; MLMMJ_DEST(0.00)[freebsd-ports@FreeBSD.org]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; ASN(0.00)[asn:4764, ipnet:2403:5800::/32, country:AU]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[dons.net.au:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi, 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/bsd.port.mk.orig 2022-08-12 09:33:02.669922000 = +0000 +++ /usr/ports/Mk/bsd.port.mk 2022-08-12 09:33:03.553032000 +0000 @@ -4052,6 +4052,7 @@ ALL-DEPENDS-FLAVORS-LIST=3D ${DEPENDS-LIST} -f -r = ${_UNIFIED_DEPENDS:Q} DEINSTALL-DEPENDS-FLAVORS-LIST=3D ${DEPENDS-LIST} -f -r = ${_UNIFIED_DEPENDS:N${PKG_DEPENDS}:Q} MISSING-DEPENDS-LIST=3D ${DEPENDS-LIST} -m = ${_UNIFIED_DEPENDS:Q} +MISSING-DEPENDS-FLAVOURS-LIST=3D ${DEPENDS-LIST} -f -m = ${_UNIFIED_DEPENDS:Q} BUILD-DEPENDS-LIST=3D ${DEPENDS-LIST} = "${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} = ${BUILD_DEPENDS} ${LIB_DEPENDS}" RUN-DEPENDS-LIST=3D ${DEPENDS-LIST} = "${LIB_DEPENDS} ${RUN_DEPENDS}" TEST-DEPENDS-LIST=3D ${DEPENDS-LIST} = ${TEST_DEPENDS:Q} @@ -4323,7 +4324,7 @@ # Install missing dependencies from package install-missing-packages: - @_dirs=3D$$(${MISSING-DEPENDS-LIST}); \ + @_dirs=3D$$(${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 "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D $i" /usr/bin/env PORTSDIR=3D"/usr/ports" dp_MAKE=3D"make" = dp_PKGNAME=3D"gs-ports-minimal-1.0" = dp_PKG_INFO=3D"/usr/local/sbin/pkg-static info -g" = dp_SCRIPTSDIR=3D"/usr/ports/Mk/Scripts" dp_OVERLAYS=3D"" /bin/sh = /usr/ports/Mk/Scripts/depends-list.sh -f -m "$i" echo done)|less (Ran in my meta port)=20 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. Thanks. -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum