From nobody Sat Feb 21 20:27:51 2026 X-Original-To: dev-commits-src-main@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 4fJJZv6rVqz6SCjM for ; Sat, 21 Feb 2026 20:27:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fJJZv64sDz3Gls for ; Sat, 21 Feb 2026 20:27:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771705671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O4KHG4a4jc2nB0M5tPuZeVfoCJZFnTzQThB3iSHh4Uk=; b=c9G5NKNkKYKhJktulbMq7ghdtw8gdb+8YpB13HQmOgnA/DtXEnRHyPpl46DqThdPyNbyWH 201o1O8+0+PbCtVc3pn8HGY09yabZY+oiTTjCKsk3pldIqjy2gXrRO1XplZzkuSg+2zgDv 0ff4c7zNQPVv6x0WEFQg0QwtW22F1d1AtWEoSbuhiu1ILc/DzJmaP57nYa/PxcDIW6TgDB ChXpo8ZiNrTL4RmlaAorHydF3/HxzpHZ+7kRfht7yPwBbpCwQaTGYh27ZMRThh3gNM0gVy 2aGJZjwuKBb0oBeRHQ1XZz9kdaIWJ98/Ww753eX4bBUpwU9XItLgTtT1V0aelA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771705671; a=rsa-sha256; cv=none; b=OVNllQ9KiH2Fmb5sCQjttQcey3KElWP+IzBz+FVi8KVA4t9TmXEz2t1L8ramsf/nYr6Ovb 2vDvHxI1m3rZq96j33T8r8AaS67kVa1OyKv5lZlYae9PkFCiEgys3GkRwBNBgdy6Y/R30Y 6XSLmZcxjRxGGb+wLoTQrBdR4MLUzLDGtPCjekCCfCN0kNxK1XDq0R+5n7s9rBYeBLFStO f/bil95RSzwVU2BE9/MuXjjUfaoPAD/GFXL8fKYAG10SBSkMI+I3IdRdVGLd0Gh5lUByJJ GRGJ1volQXEP0l0cvpbg/X6aGTF0CJCgWZpB4gye+Y4fskEAOUd0EADsUdx8Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771705671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O4KHG4a4jc2nB0M5tPuZeVfoCJZFnTzQThB3iSHh4Uk=; b=n6L9OATz87HQ0R+RL0xOkPqYK+C7HdPmt3OTp0mDzGZvVmjP2dnF3muRFrRlMpoS6+Vddy ZYozIBfRJx1MCf5fNrD161vDgiBlEh8s4parSoUt4xoQFDFa6bzqNcv5vXv1strHhjrN7Y 2CNpzF0yn7ikQ9mLcpCR+rks9+cuAq8I7b1cDU+x+cbsqqFn5p4gRi1C41KikhATeUGiNO HNSWm2pBrEPeZ2c8JBMDf2f8NZwEhiKn/sGhVVIQ9YpSOFtJFF6Q6qyMUgXos6YbJc3c8R 10ZY6gq3zGU9ypMnDyRAnxAqelCwt/p40u0N856HjuCfevsFL8p0z8eGZlAlDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fJJZv4hgrz1RrK for ; Sat, 21 Feb 2026 20:27:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1bbd3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 21 Feb 2026 20:27:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 7965c93e4d41 - main - packages: Don't create empty packages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7965c93e4d4103ba6ed7ac1e5f1599c93cbcdbf7 Auto-Submitted: auto-generated Date: Sat, 21 Feb 2026 20:27:51 +0000 Message-Id: <699a1547.1bbd3.1b2842a2@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=7965c93e4d4103ba6ed7ac1e5f1599c93cbcdbf7 commit 7965c93e4d4103ba6ed7ac1e5f1599c93cbcdbf7 Author: Lexi Winter AuthorDate: 2026-02-21 20:19:42 +0000 Commit: Lexi Winter CommitDate: 2026-02-21 20:21:59 +0000 packages: Don't create empty packages If a package plist only contains directories, but no files, do not create the package. This fixes an issue where setting "package=foo" in mtree causes the "foo" package to always be created, even if nothing else installs in that package, because the mtree entry is always added to the plist. This most often happens: * With architecture-specific directories, because mtree can't install a directory conditionally based on architecture, and * With packages that are completely empty when a particular src.conf knob is disabled, because mtree will still create the directories. Although it's theoretically possible that we might want to create a package that only contains directories, there are no such packages today. MFC after: 2 weeks (stable/15 only) Reviewed by: manu, des Differential Revision: https://reviews.freebsd.org/D55412 Sponsored by: https://www.patreon.com/bsdivy --- Makefile.inc1 | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 55b41d76801d..93c54e0a0d14 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2272,17 +2272,24 @@ create-world-packages-jobs: create-world-package-${pkgname} create-world-package-${pkgname}: .PHONY @sh ${SRCDIR}/release/packages/generate-ucl.sh -o ${pkgname} \ -s ${SRCDIR} -u ${WSTAGEDIR}/${pkgname}.ucl - @awk -F\" ' \ - /^name/ { printf("===> Creating %s-", $$2); next } \ - /^version/ { print $$2; next } \ - ' ${WSTAGEDIR}/${pkgname}.ucl - ${PKG_CMD} -o ABI=${PKG_ABI} -o ALLOW_BASE_SHLIBS=yes \ - -o OSVERSION="${SRCRELDATE}" \ - create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \ - -M ${WSTAGEDIR}/${pkgname}.ucl \ - -p ${WSTAGEDIR}/${pkgname}.plist \ - -r ${WSTAGEDIR} \ - -o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR} + @if [ "$$(grep -vc '^@dir' ${WSTAGEDIR}/${pkgname}.plist)" -gt 0 ]; then \ + awk -F\" ' \ + /^name/ { printf("===> Creating %s-", $$2); next } \ + /^version/ { print $$2; next } \ + ' ${WSTAGEDIR}/${pkgname}.ucl && \ + ${PKG_CMD} -o ABI=${PKG_ABI} -o ALLOW_BASE_SHLIBS=yes \ + -o OSVERSION="${SRCRELDATE}" \ + create -f ${PKG_FORMAT} ${PKG_CLEVEL} -T${PKG_CTHREADS} \ + -M ${WSTAGEDIR}/${pkgname}.ucl \ + -p ${WSTAGEDIR}/${pkgname}.plist \ + -r ${WSTAGEDIR} \ + -o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR}; \ + else \ + awk -F\" ' \ + /^name/ { printf("===> Skipping %s-", $$2); next } \ + /^version/ { print $$2; next } \ + ' ${WSTAGEDIR}/${pkgname}.ucl; \ + fi .endfor create-sets-packages-jobs: .PHONY create-sets-packages