ports/59696: bsd.port.mk: change `ls' with `pkg_info -I' in check-conflicts

Sergey Matveychuk sem at ciam.ru
Wed Nov 26 07:00:35 UTC 2003


>Number:         59696
>Category:       ports
>Synopsis:       bsd.port.mk: change `ls' with `pkg_info -I' in check-conflicts
>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:   Tue Nov 25 23:00:32 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Matveychuk
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD Current.sem-home.ciam.ru 5.1-CURRENT FreeBSD 5.1-CURRENT #1: Fri Nov 21 07:47:47 MSK 2003 root at Current.sem-home.ciam.ru:/usr/obj/usr/src/sys/CURRENT i386


	
>Description:
	
	Change `ls' command with `pkg_info -I' and `awk'  in check-conflicts
	target (as marcus@ wished).

	Thanks Oliver Eikemeier for idea.
>How-To-Repeat:
	
>Fix:

	

--- ls-pkg_info.patch begins here ---
--- bsd.port.mk.orig	Wed Nov 26 09:15:29 2003
+++ bsd.port.mk	Wed Nov 26 09:44:54 2003
@@ -3099,13 +3099,13 @@
 .if defined(CONFLICTS) && !defined(DISABLE_CONFLICTS)
 	@${RM} -f ${WRKDIR}/.CONFLICTS
 .for conflict in ${CONFLICTS}
-	@found="`${LS} -d ${PKG_DBDIR}/${conflict} 2>/dev/null || ${TRUE}`"; \
+	@found="`${PKG_INFO} -I ${conflict} 2>/dev/null | ${AWK} '{print $$1}' || ${TRUE}`"; \
 	if [ X"$$found" != X"" ]; then \
 		${ECHO} "$$found" >> ${WRKDIR}/.CONFLICTS; \
 	fi
 .endfor
 	@if [ -s ${WRKDIR}/.CONFLICTS ]; then \
-		found=`cat ${WRKDIR}/.CONFLICTS | ${SED} -e s'|${PKG_DBDIR}/||g' | tr '\012' ' '`; \
+		found=`cat ${WRKDIR}/.CONFLICTS | tr '\012' ' '`; \
 		${ECHO_MSG} "===>  ${PKGNAME} conflicts with installed package(s): "; \
 		for entry in $$found; do \
 			${ECHO_MSG} "      $$entry"; \
--- ls-pkg_info.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list