git: aedc18359a34 - main - Mk/bsd.port.mk: fix NO_PKG_REGISTER
Baptiste Daroussin
bapt at FreeBSD.org
Tue Sep 21 08:42:35 UTC 2021
The branch main has been updated by bapt:
URL: https://cgit.FreeBSD.org/ports/commit/?id=aedc18359a342d7a3a1bb7c09820059175a24542
commit aedc18359a342d7a3a1bb7c09820059175a24542
Author: Baptiste Daroussin <bapt at FreeBSD.org>
AuthorDate: 2021-09-21 08:40:03 +0000
Commit: Baptiste Daroussin <bapt at FreeBSD.org>
CommitDate: 2021-09-21 08:40:03 +0000
Mk/bsd.port.mk: fix NO_PKG_REGISTER
Since we switched to pkg, NO_PKG_REGISTER was not working anymore.
Since pkg 1.17.2 the pkg register command do support -N option which
allows to bring back NO_PKG_REGISTER.
PR: 191461
---
Mk/bsd.port.mk | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index f8fa7fa4b026..337d3f6be6a6 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -4747,19 +4747,24 @@ flavors-package-names: .PHONY
# Fake installation of package so that user can pkg delete it later.
.if !target(fake-pkg)
STAGE_ARGS= -i ${STAGEDIR}
+.if defined(NO_PKG_REGISTER)
+STAGE_ARGS= -N
+.endif
-.if !defined(NO_PKG_REGISTER)
fake-pkg:
.if defined(INSTALLS_DEPENDS)
+.if !defined(NO_PKG_REGISTER)
@${ECHO_MSG} "===> Registering installation for ${PKGNAME} as automatic"
+.endif
@${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} -d ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST}
.else
+.if !defined(NO_PKG_REGISTER)
@${ECHO_MSG} "===> Registering installation for ${PKGNAME}"
+.endif
@${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST}
.endif
@${RM} -r ${METADIR}
.endif
-.endif
# Depend is generally meaningless for arbitrary ports, but if someone wants
# one they can override this. This is just to catch people who've gotten into
More information about the dev-commits-ports-all
mailing list