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
This commit is contained in:
+1
-8
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user