Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Sep 2021 08:42:34 GMT
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: aedc18359a34 - main - Mk/bsd.port.mk: fix NO_PKG_REGISTER
Message-ID:  <202109210842.18L8gYMd032947@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=aedc18359a342d7a3a1bb7c09820059175a24542

commit aedc18359a342d7a3a1bb7c09820059175a24542
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2021-09-21 08:40:03 +0000
Commit:     Baptiste Daroussin <bapt@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109210842.18L8gYMd032947>