When pkgng is used and the port supports staging, `make install` with NO_PKG_REGISTER set does nothing - no files are installed to the system.
This seeminlgy happens because the package installation and pkgdb registration are now done in the same time with pkg, and whole fake-pkg target which runs this pkg is wrapped in .if !defined(NO_PKG_REGISTER):
---
fake-pkg: create-manifest
.if !defined(NO_PKG_REGISTER)
.if defined(INSTALLS_DEPENDS)
@${ECHO_MSG} "===> Registering installation for ${PKGNAME} as automatic"
.else
@${ECHO_MSG} "===> Registering installation for ${PKGNAME}"
.endif
.if defined(INSTALLS_DEPENDS)
@${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} -d ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST}
.else
@${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST}
.endif
@${RM} -rf ${METADIR}
.else
@${DO_NADA}
.endif
.endif
---
Fix:
Likely a mode needs to be added to pkg which does installation but not registration, and it should be used in pkgng.mk
Also, this probably may be achieved with using -l argument of `pkg register` and fake PKG_DBDIR, but I haven't tested.
How-To-Repeat: Try `make install` any port with NO_PKG_REGISTER.