From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Nov 14 02:00:01 2012 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 237DB72 for ; Wed, 14 Nov 2012 02:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id E9CBA8FC15 for ; Wed, 14 Nov 2012 02:00:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qAE2009w062801 for ; Wed, 14 Nov 2012 02:00:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qAE200te062793; Wed, 14 Nov 2012 02:00:00 GMT (envelope-from gnats) Resent-Date: Wed, 14 Nov 2012 02:00:00 GMT Resent-Message-Id: <201211140200.qAE200te062793@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mamoru Sakaue Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91DC56E for ; Wed, 14 Nov 2012 01:59:37 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 7859E8FC08 for ; Wed, 14 Nov 2012 01:59:37 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qAE1xaB6034819 for ; Wed, 14 Nov 2012 01:59:36 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id qAE1xaqc034818; Wed, 14 Nov 2012 01:59:36 GMT (envelope-from nobody) Message-Id: <201211140159.qAE1xaqc034818@red.freebsd.org> Date: Wed, 14 Nov 2012 01:59:36 GMT From: Mamoru Sakaue To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/173620: Recovery of the functionality of COFLICTS among ports with different default PREFIXs, ex., between KDE4 and others X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 02:00:01 -0000 >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: