git: f6d1cdabdd6f - main - Makefile.inc1: Handle pkg development versions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 Sep 2025 22:07:02 UTC
The branch main has been updated by ivy:
URL: https://cgit.FreeBSD.org/src/commit/?id=f6d1cdabdd6fe5b26bda58348647d891ad138471
commit f6d1cdabdd6fe5b26bda58348647d891ad138471
Author: Lexi Winter <ivy@FreeBSD.org>
AuthorDate: 2025-09-23 21:41:20 +0000
Commit: Lexi Winter <ivy@FreeBSD.org>
CommitDate: 2025-09-23 22:06:33 +0000
Makefile.inc1: Handle pkg development versions
Development versions of pkg have a version like "2.3.0-d8bbde1c3-dirty",
which is not handled by PKG_BIN_VERSION, so PKG_EXT ends up being "tar"
and this breaks update-packages.
Fix the PKG_BIN_VERSION logic, and while here, remove backwards compat
for pkg versions prior to 2.0, which no one should be using to build
main or stable/15. This means nothing is left to use PKG_BIN_VERSION,
but continue to set it, since we might need it again in the future.
MFC after: 1 day
Reviewed by: manu, kevans
Differential Revision: https://reviews.freebsd.org/D52666
---
Makefile.inc1 | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/Makefile.inc1 b/Makefile.inc1
index 6744a25965c6..94c33ca791fd 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2004,12 +2004,8 @@ _pkgbootstrap: .PHONY
.endif
PKG_BIN_VERSION!=${PKG_CMD} --version </dev/null 2>/dev/null |\
- awk -F. '/^[0-9.]+$$/ {print $$1 * 10000 + $$2 * 100 + $$3}'
-.if ${PKG_BIN_VERSION} < 11700
-PKG_EXT= ${PKG_FORMAT}
-.else
+ awk -F. '/^[0-9.]+(-.*)?$$/ {print $$1 * 10000 + $$2 * 100 + $$3}'
PKG_EXT= pkg
-.endif
.if !defined(PKG_VERSION_FROM) && make(real-update-packages) && \
exists(${PKG_ABI_FILE}) && exists(${REPODIR}/${PKG_ABI}/latest)
@@ -2371,9 +2367,6 @@ sign-packages: .PHONY
real-sign-packages: _pkgbootstrap .PHONY
printf "version = 2;\n" > ${WSTAGEDIR}/meta
-.if ${PKG_BIN_VERSION} < 11700
- printf "packing_format = \"${PKG_FORMAT}\";\n" >> ${WSTAGEDIR}/meta
-.endif
@${PKG_CMD} -o ABI=${PKG_ABI} -o OSVERSION="${SRCRELDATE}" \
-o WORKERS_COUNT=${PKG_WORKERS_COUNT} repo \
-m ${WSTAGEDIR}/meta \