diff options
| author | Lexi Winter <ivy@FreeBSD.org> | 2025-09-23 21:41:20 +0000 |
|---|---|---|
| committer | Lexi Winter <ivy@FreeBSD.org> | 2025-09-23 22:06:33 +0000 |
| commit | f6d1cdabdd6fe5b26bda58348647d891ad138471 (patch) | |
| tree | 02d11c5cc22bf2c5ebf9efa06a49bdaaaafba8fb | |
| parent | 61ca69110f2676b7dd3c7ff8dea899615d341e1e (diff) | |
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
| -rw-r--r-- | Makefile.inc1 | 9 |
1 files changed, 1 insertions, 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 \ |
