Date: Wed, 14 Nov 2012 01:59:36 GMT From: Mamoru Sakaue <sakaue.mamoru@mwghennndo.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/173620: Recovery of the functionality of COFLICTS among ports with different default PREFIXs, ex., between KDE4 and others Message-ID: <201211140159.qAE1xaqc034818@red.freebsd.org> Resent-Message-ID: <201211140200.qAE200te062793@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 173620 >Category: ports >Synopsis: Recovery of the functionality of COFLICTS among ports with different default PREFIXs, ex., between KDE4 and others >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Nov 14 02:00:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Mamoru Sakaue >Release: 8.3-RELEASE >Organization: MwGhennndo >Environment: FreeBSD Grubstake.EmpireNmw 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #0: Mon Jun 11 23:52:38 UTC 2012 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: 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. >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. >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: *** /usr/ports/Mk/bsd.port.mk.orig 2012-10-26 17:16:17.000000000 +0900 --- /usr/ports/Mk/bsd.port.mk 2012-11-14 09:14:23.000000000 +0900 *************** *** 3786,3792 **** if ${PKG_INFO} -e $${entry} ; then \ prfx=`${PKG_INFO} -q -p "$${entry}" 2> /dev/null | ${SED} -ne '1s/^@cwd //p'`; \ orgn=`${PKG_INFO} -q -o "$${entry}" 2> /dev/null`; \ ! if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ conflicts_with="$${conflicts_with} $${entry}"; \ fi; \ fi; \ --- 3786,3793 ---- if ${PKG_INFO} -e $${entry} ; then \ prfx=`${PKG_INFO} -q -p "$${entry}" 2> /dev/null | ${SED} -ne '1s/^@cwd //p'`; \ orgn=`${PKG_INFO} -q -o "$${entry}" 2> /dev/null`; \ ! prfx_default=`${MAKE} -C "${PORTSDIR}/$${orgn}" -V PREFIX 2> /dev/null || :`; \ ! if [ \( -z "$${prfx_default}" -o "/$${prfx_default}" = "/$${prfx}" \) -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ conflicts_with="$${conflicts_with} $${entry}"; \ fi; \ fi; \ *************** *** 3843,3849 **** if ${PKG_INFO} -e $${entry} ; then \ prfx=`${PKG_INFO} -q -p "$${entry}" 2> /dev/null | ${SED} -ne '1s/^@cwd //p'`; \ orgn=`${PKG_INFO} -q -o "$${entry}" 2> /dev/null`; \ ! if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ conflicts_with="$${conflicts_with} $${entry}"; \ fi; \ fi; \ --- 3844,3851 ---- if ${PKG_INFO} -e $${entry} ; then \ prfx=`${PKG_INFO} -q -p "$${entry}" 2> /dev/null | ${SED} -ne '1s/^@cwd //p'`; \ orgn=`${PKG_INFO} -q -o "$${entry}" 2> /dev/null`; \ ! prfx_default=`${MAKE} -C "${PORTSDIR}/$${orgn}" -V PREFIX 2> /dev/null || :`; \ ! if [ \( -z "$${prfx_default}" -o "/$${prfx_default}" = "/$${prfx}" \) -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ conflicts_with="$${conflicts_with} $${entry}"; \ fi; \ fi; \ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211140159.qAE1xaqc034818>