For DEPENDS_TARGET != install to work CONFLICTS_INSTALL should only block ports that call "install". Currently, it behaves the same as CONFLICTS: $ pkg install -qy libressl $ make build -C security/openssl ===> openssl-1.0.2j_1,1 conflicts with installed package(s): libressl-2.4.3 They install files into the same place. You may want to stop build with Ctrl + C. ^C $ fgrep CONFLICTS security/openssl/Makefile CONFLICTS_INSTALL= libressl-[0-9]* \
Don't hit control-C, it should build just fine.
Indeed but confusing. So, bug 213889 doesn't *require* (but would still benefit from) the fix here.
CONFLICTS_INSTALL is informing the user, it says: Hi, you are building foo, but you already have bar which it conflicts with, so you won't be able to install foo, if you don't want it, you may stop it now. It is different from CONFLICTS which will stop the build just there. The problem in the bug you are referencing looks like a bug in the port the user is trying to install, it should set IGNORE if !${SSL_DEFAULT:Mlibressl*} or something similar.
Is it possible to hide conflicts' banner to avoid confusing users of BUILD_DEPENDS=path:dir:target consumers where target != install ?
I agree with Jan, the CONFLICT_INSTALL should only appear imho if one is trying to install, not otherwise, there are plenty of valid thing one can do without installing. It adds a painful sleep 10 for those operations.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=acf5d2725a4e221a2aceb44297e151dc3902735d commit acf5d2725a4e221a2aceb44297e151dc3902735d Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2022-08-26 08:52:51 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2022-08-26 09:03:31 +0000 CONFLICTS_INSTALL: check later for conflicts Until now, the check of the CONFLICTS_INSTALL was done during the sanity check, meaning very early in the package building process. this makes it painful in 2 cases: 1. a port depend at build time on the extraction of this port, it will print its warning message along with the default timer, while we will never reach the said conflict at all. 2. since the ports tree has been staged, one can even go up to create a valid package even if a locally conflicting package is locally installed. This change make the check and print of the conflicts only happen during the install phase, the same way the ports tree checks if a previous version is already installed. PR: 213890 Discussed with: tcberner Reviewed by: tcberner Differential Revision: https://reviews.freebsd.org/D36355 Mk/bsd.port.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)