How to set CONFLICTS properly?

Gerald Pfeifer gerald at pfeifer.com
Tue May 3 18:17:49 PDT 2005


On Wed, 4 May 2005, Edwin Groothuis wrote:
>>   # CONFLICTS - A list of package name patterns that the port conflicts with.
>>   #             It's possible to use any shell meta-characters for pattern
>>   #             matching.
>>   #             E.g. apache*-1.2* apache*-1.3.[012345] apache-*+ssl_*
>> 
>> However, CONFLICTS= {gcc-3.3.*,gcc-4.1.*}* fails to detect an installed 
>> gcc-3.3.6_20050427 port, whereas `ls $PKG_DBDIR/gcc-{3.3.*,4.1.*}` does
>> indeed find the directory in the database.
>> 
>> Why doesn't that CONFLICTS statement work?
> CONFLICTS=      gcc-3.4* gcc-4.1*

That gave me the necessary hint: shell meta-characters above refers to
BSD /bin/sh, not tcsh nor GNU /bin/sh (alias bash), and while the latter
two support {...,...}, BSD /bin/sh does not.

Any comments on the patch below, before I send-pr it to portmgr?

Gerald

Index: bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.511
diff -u -3 -p -r1.511 bsd.port.mk
--- bsd.port.mk	17 Mar 2005 23:22:07 -0000	1.511
+++ bsd.port.mk	4 May 2005 01:17:06 -0000
@@ -468,10 +468,10 @@ FreeBSD_MAINTAINER=	portmgr at FreeBSD.org
 # Conflict checking.  Use if your port cannot be installed at the same time as
 # another package.
 #
-# CONFLICTS		- A list of package name patterns that the port conflicts with.
-#				  It's possible to use any shell meta-characters for pattern
-#				  matching.
-#				  E.g. apache*-1.2* apache*-1.3.[012345] apache-*+ssl_*
+# CONFLICTS		- A list of package name patterns that the port conflicts
+#				  with, separated by blanks.  It's possible to use shell
+#				  meta-characters "*", "?", "[" and "!" for pattern matching.
+#				  Example: apache*-1.2* apache*-1.3.[012345] apache-*+ssl_*
 #
 # Various directory definitions and variables to control them.
 # You rarely need to redefine any of these except WRKSRC and NO_WRKSUBDIR.


More information about the freebsd-ports mailing list