From nobody@FreeBSD.org  Fri May 21 07:07:51 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B5CF41065672
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 May 2010 07:07:51 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D9BF8FC20
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 May 2010 07:07:50 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o4L77nKA097517
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 May 2010 07:07:49 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o4L77nNQ097516;
	Fri, 21 May 2010 07:07:49 GMT
	(envelope-from nobody)
Message-Id: <201005210707.o4L77nNQ097516@www.freebsd.org>
Date: Fri, 21 May 2010 07:07:49 GMT
From: Elijah <ilya@el-crane.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: create a treadle to prevent early-check for port conflicts
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         146787
>Category:       ports
>Synopsis:       [bsd.port.mk] create a treadle to prevent early-check for port conflicts
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 21 07:10:03 UTC 2010
>Closed-Date:    Wed Dec 01 08:38:07 UTC 2010
>Last-Modified:  Wed Dec 01 08:38:07 UTC 2010
>Originator:     Elijah
>Release:        8.0-STABLE #0 r206975M
>Organization:
>Environment:
>Description:
Discussion here:
http://lists.freebsd.org/pipermail/freebsd-questions/2010-January/211128.html
beliefs like mine
http://lists.freebsd.org/pipermail/freebsd-questions/2010-January/211194.html
CONFLICTS_AT_INSTALL may not sounds good, but I think that's idea is a good composition for this situation
>How-To-Repeat:
[ilya] /usr/ports/devel/llvm-devel# make checksum

===>  llvm-devel-2.8.r103179_1 conflicts with installed package(s):
      llvm-2.7

      They install files into the same place.
      Please remove them first with pkg_delete(1).
*** Error code 1

Stop in /usr/ports/devel/llvm-devel.

And disabling conflicts resolution via DISABLE_CONFLICTS is a dirty solution.
>Fix:
--- bsd.port.mk.orig    2010-05-21 14:42:02.000000000 +0900
+++ bsd.port.mk 2010-05-21 15:57:55.000000000 +0900
@@ -3805,7 +3805,10 @@

 .if !target(check-conflicts)
 check-conflicts:
-.if defined(CONFLICTS) && !defined(DISABLE_CONFLICTS)
+.if defined(_INSTALL_SEQ) && defined(CONFLICTS_AT_INSTALL)
+       undef CONFLICTS_AT_INSTALL;
+.endif
+.if defined(CONFLICTS) && !defined(DISABLE_CONFLICTS) && !defined(CONFLICTS_AT_INSTALL)
        @found=`${PKG_INFO} -I ${CONFLICTS:C/.+/'&'/} 2>/dev/null | ${AWK} '{print $$1}'`; \
        conflicts_with=; \
        for entry in $${found}; do \
@@ -4350,8 +4353,9 @@
 _BUILD_SEQ=            build-message pre-build pre-build-script do-build \
                                post-build post-build-script
 _INSTALL_DEP=  build
-_INSTALL_SEQ=  install-message run-depends lib-depends apply-slist pre-install \
-                               pre-install-script generate-plist check-already-installed
+_INSTALL_SEQ=  install-message run-depends lib-depends apply-slist check-conflicts \
+                               pre-install pre-install-script generate-plist \
+                               check-already-installed
 _INSTALL_SUSEQ= check-umask install-mtree pre-su-install \
                                pre-su-install-script create-users-groups do-install \
                                install-desktop-entries post-install post-install-script \


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Fri May 21 11:50:44 UTC 2010 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=146787 

From: Mark Linimon <linimon@lonesome.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/146787: create a treadle to prevent early-check for
	portconflicts
Date: Fri, 21 May 2010 10:27:10 -0500

 ----- Forwarded message from Ilya Zhuravlev <ilya@ispsystem.com> -----
 
 From: Ilya Zhuravlev <ilya@ispsystem.com>
 To: freebsd-ports-bugs@freebsd.org
 Subject: ports/146787: create a treadle to prevent early-check for
 	portconflicts
 
 Oops, catching by _INSTALL_SEQ is not good idea
 _______________________________________________
 freebsd-ports-bugs@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
 To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscribe@freebsd.org"
 
 
 ----- End forwarded message -----
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Wed Dec 1 08:38:06 UTC 2010 
State-Changed-Why:  
fixed now please sync your portstree. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=146787 
>Unformatted:
