CONFLICTS, CONFLICTS_BUILD and CONFLICTS_INSTALL don't work between ports with different default PREFIXs. For example, this problem arises between KDE4-related ports and the other ports. The current implementation of confliction check in bsd.port.mk is based on matching PREFIXs of the installing port and installed package as well as matching of the package name pattern given by CONFLICTS, CONFLICTS_BUILD and CONFLICTS_INSTALL with installed ones. As the original intention, this mechanism will assume that PREFIX is customized only for manual relocation of installtion paths. However this rule is practically violated by some ports like KDE4-related ones which redefine PREFIX as /usr/local/kde4 by default. In this patchwork, I propose a change of the macthing rule in bsd.port.mk so as to make it work correctly with the default configuration of the system. Please note that this modification makes the matching rule stricter for packages installed in environments where PREFIX or LOCALBASE is explicitly customized, for example, temporal environment in "port test" command of ports-mgmt/porttools. In that case, DISABLE_CONFLICTS may be given as a make argument for countermeasure. Fix: The current implementation gives conclusion of a conflicting package by macthing of the current PREFIX with PREFIX registered for the package whose package name matches any of patterns in CONFLICTS* variables. I propose a new implementation that gives conclusion of a conflicting package by macthing of the default PREFIX of the package with the registered PREFIX of the package. If the default PREFIX cannot be evaluated because of moving or abolishment of the origin for the package, the conclusion is given as true. This solution is not fundamental as well, but makes the situation more practical. Patch attached with submission follows: How-To-Repeat: With qt-3.* installed, try insallation of editors/calligra which defines "CONFLICTS_BUILD=qt-3.*" # pkg_info -I qt-3.\* qt-3.3.8_14 Multiplatform C++ application framework # cd /usr/ports/editors/calligra # make Then no confliction is reported and the process continues to the build stage.
Responsible Changed From-To: freebsd-ports-bugs->portmgr bsd.port.mk patch
I agree about proposed changes for CONFLICTS_BUILD, but not for _INSTALL. CONFLICTS_INSTALL is intended for ports that install files in the same place. Obviously, such ports don't really conflict when installed into different prefixes. Max
I agree. Then only the first half of the patch should be applied. P.S. I revise the last paragraph of Description: ----------------------------------------------- > Please note that this modification makes the matching rule stricter for > packages installed in environments where PREFIX or LOCALBASE is explicitly > customized, for example, temporal environment in "port test" command of > ports-mgmt/porttools. In that case, DISABLE_CONFLICTS may be given as a make > argument for countermeasure. ===> Please note that this modification makes the matching rule LOOSER among packages installed in environments where PREFIX or LOCALBASE is explicitly customized, for example, temporal environment in "port test" command of ports- mgmt/porttools. Another side effect is that the matching rule becomes stricter for packages whose origins are moved or deleted. In that case, DISABLE_CONFLICTS may be given as a make argument for countermeasure. ----------------------------------------------- Mamoru Sakaue
> I agree about proposed changes for CONFLICTS_BUILD, but not for _INSTALL. > CONFLICTS_INSTALL is intended for ports that install files in the same place. > Obviously, such ports don't really conflict when installed into different prefixes. Ports that explicitly install in a prefix via @cwd are going to fail even with different PREFIX, anyway.
Anyway, since PREFIX is redefined in several places of bsd.(gnustep|kde|kde4| python).mk so as NOT to inherit the predefined value as "grand" prefix, it should not be recommended for users to control the installation paths by giving a explicit PREFIX value to a make command unless they are really aware of what to occur and are going to do everything on their own responsibilities. Only LOCALBASE and LINUXBASE will be favorable for such purposes because they are defined in only one place at the head of bsd.ports.mk and LOCALBASE is inherited for the redefinitions of PREFIX. Therefore, as an ideal solution, the package database should record the values of LOCALBASE and LINUXBASE rather than PREFIX for further judgment of confliction. I think that the current goal as a workaround should be to make CONFLICTS* work as intended by the specification in the default configuration.
Infrastructure PR.
We don't support using multiple PREFIXes.