From nobody Thu Mar 12 01:38:53 2026 X-Original-To: dev-commits-src-all@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 4fWVdT2YhVz6VMPy for ; Thu, 12 Mar 2026 01:38:53 +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 4fWVdT1tywz3Yr3 for ; Thu, 12 Mar 2026 01:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1773279533; 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=0XA+/r427joDZ4n76cS239UQn8yhSoP9KEK0Kn6P5xs=; b=yk56C5xLuVbEJUUjPt8Li0IWxHvMbwiE0iXtqg40IqcIrMiYwUrRvxmLk35uR7EbbSsLsU 2jmaFmFxduu3Qbfy7XHsMJNJq7jdYZf82gYhPMgj0JkJ/jD3WEI5D6kFy552wiI5r+/kD0 RFqdiiBBCEJyFkCM1mQggaAKRjxYyQSKWSeghnMuxCp1VtwUrhpt613GFv4jppc1KCj2aH PcFAC3q2Dzd6wlw5xNRNL66KKnaMzoVWnS7nOraExTX9M/kvO7FMdN3RpznyZ7O6lBGH79 KlMKZGY5MBB1tBpXPZ7uI3t2YjbO2Q7sCDCOH9Adv9meONT2lYPY3DSHgsi+pA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1773279533; a=rsa-sha256; cv=none; b=q8mMMNDcSbilXVRh7aK/1C7PbPGQUANWs+e+avFkVFwy+HVvRJIgOSeRiLdgdmgEv7/eX9 HKjF8EejGujKC+3RWwwzlRYbqvKDBDiEigZK+kqW34gCl62QEM+aghCNaCpQ9JRGg89ehA 3OaX1hfdg7D2dDgqEUtxY0MGgCx5TfxjQe7DR6OXdctM72g39Yql+zkyh2A796KJd9kSai bNWHy5W5jybPZD62Nwf5gLURYrU/aI9j7yxXELyo92gsxgdpuX0f5tS0qGcTr+ixFsMzVo pNHNTGD+CiByca2hif20RpmiqTiUySXnG7Gbp5nrcIVQKiWjVmLsmzruIS7A/g== 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=1773279533; 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=0XA+/r427joDZ4n76cS239UQn8yhSoP9KEK0Kn6P5xs=; b=o+2QPBdPhrjfKgmRDitF0CZVqfHr6jSKA01cwICbWAx1xq3aAa2t4bDyARR4M0w3EidNmo HoqlOdzU5fi3fGFEX8m2+364fsBJomuRgnaLiuD7SJYvR+J48VD5Elw+VSGvIgQrgzeyNS 8xYWA5rs25WVwN4ZYl40u3R6U4bqWv1s67M6osZ+sVfOV3L3gSscbcjHtq2GI6afnDWGkB IUxqcM5vCf537H8MU5fqAEY82zX9QAe2VrJMLKruOutP2Rzzrlp3Ni89eOFpdtLco8etNf bSsGf4tDnceVzcj/qWJ5gXe9yf1ed8c8BHJ48ZaUNm2kqRIzCO0M4iU8xoUO2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fWVdT1H1dz8Cm for ; Thu, 12 Mar 2026 01:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f06 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 12 Mar 2026 01:38:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Lexi Winter Subject: git: 2a3d650552fc - stable/15 - packages: Don't create empty packages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 2a3d650552fc1a48c89e3d6d8e77f64ad53372ed Auto-Submitted: auto-generated Date: Thu, 12 Mar 2026 01:38:53 +0000 Message-Id: <69b2192d.35f06.575528de@gitrepo.freebsd.org> The branch stable/15 has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=2a3d650552fc1a48c89e3d6d8e77f64ad53372ed commit 2a3d650552fc1a48c89e3d6d8e77f64ad53372ed Author: Lexi Winter AuthorDate: 2026-02-21 20:19:42 +0000 Commit: Lexi Winter CommitDate: 2026-03-12 01:38:01 +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 (cherry picked from commit 7965c93e4d4103ba6ed7ac1e5f1599c93cbcdbf7) --- Makefile.inc1 | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 0af5c38f0489..30d37e6bd2f5 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2277,17 +2277,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