aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2021-09-21 08:40:03 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2021-09-21 08:40:03 +0000
commitaedc18359a342d7a3a1bb7c09820059175a24542 (patch)
tree6c8c81681a14ed5c4b29c65bd7719beb2a5a1efc /Mk
parent5094187e53b6c1611ef1c00e90f960a2b75eaf52 (diff)
downloadports-aedc18359a342d7a3a1bb7c09820059175a24542.tar.gz
ports-aedc18359a342d7a3a1bb7c09820059175a24542.zip
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
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk9
1 files 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