Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Mar 2006 12:52:44 +0200
From:      Vasil Dimov <vd@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        portmgr@FreeBSD.org
Subject:   ports/94164: [patch] pretty-print-(build|run)-depends-list targets do the same thing
Message-ID:  <20060307105244.GA12539@qlovarnika.bg.datamax>
Resent-Message-ID: <200603071100.k27B0HKN018502@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         94164
>Category:       ports
>Synopsis:       [patch] pretty-print-(build|run)-depends-list targets do the same thing
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 07 11:00:17 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Vasil Dimov
>Release:        FreeBSD 6.0-STABLE amd64
>Organization:
DataMax
>Environment:

>Description:

pretty-print-run-depends-list and pretty-print-build-depends-list do
exactly the same thing - print the 8th field of the port's entry in the
INDEX file

>How-To-Repeat:

/usr/ports/x11/xorg% make pretty-print-build-depends-list
This port requires package(s) "expat-2.0.0_1 fontconfig-2.3.2_3,1 freetype2-2.1.10_3 libdrm-2.0_1 pkgconfig-0.20 xorg-libraries-6.9.0" to build.

/usr/ports/x11/xorg% make pretty-print-run-depends-list
This port requires package(s) "expat-2.0.0_1 fontconfig-2.3.2_3,1 freetype2-2.1.10_3 libdrm-2.0_1 pkgconfig-0.20 xorg-libraries-6.9.0" to run.

/usr/ports/x11/xorg% grep ^xorg-6 /usr/ports/INDEX-6 |tr '|' \\n |cat -n
     1	xorg-6.9.0
     2	/usr/ports/x11/xorg
     3	/usr/local
     4	X.Org distribution metaport
     5	/usr/ports/x11/xorg/pkg-descr
     6	x11@FreeBSD.org
     7	x11
     8	expat-2.0.0_1 fontconfig-2.3.2_3,1 freetype2-2.1.10_3 libdrm-2.0_1 pkgconfig-0.20 xorg-libraries-6.9.0
     9	bitstream-vera-1.10_2 dri-6.4.1,2 expat-2.0.0_1 fontconfig-2.3.2_3,1 freetype2-2.1.10_3 libXft-2.1.7_1 libdrm-2.0_1 pkgconfig-0.20 png-1.2.8_3 xorg-clients-6.9.0_2 xorg-documents-6.9.0 xorg-fonts-100dpi-6.9.0_1 xorg-fonts-75dpi-6.9.0_1 xorg-fonts-cyrillic-6.9.0_1 xorg-fonts-encodings-6.9.0_1 xorg-fonts-miscbitmaps-6.9.0_1 xorg-fonts-truetype-6.9.0 xorg-fonts-type1-6.9.0 xorg-fontserver-6.9.0_1 xorg-libraries-6.9.0 xorg-manpages-6.9.0 xorg-nestserver-6.9.0 xorg-printserver-6.9.0 xorg-server-6.9.0 xorg-vfbserver-6.9.0 xterm-206_1
    10	http://www.x.org/
    11	
    12	
    13	

You see - the output is the same regardless of the build and run
dependencies recorded in the INDEX file.

>Fix:

Field 9 should be printed when pretty-run target is invoked.

--- bsd.port.mk_pretty.diff begins here ---
Index: bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.529
diff -u -r1.529 bsd.port.mk
--- bsd.port.mk	23 Feb 2006 15:37:20 -0000	1.529
+++ bsd.port.mk	7 Mar 2006 10:31:00 -0000
@@ -4892,9 +4892,11 @@
 	if [ ! -r ${INDEXDIR}/${INDEXFILE} ] ; then \
 		${ECHO_CMD} "${.TARGET} requires an INDEX file (${INDEXFILE}). Please run make index or make fetchindex."; \
 	else \
+		target=${.TARGET:C/pretty-print-(.*)-depends-list/\1/} ; \
+		if [ "$$target" = "build" ] ; then fldnum=8 ; else fldnum=9 ; fi ; \
 		${ECHO_CMD} -n 'This port requires package(s) "' ; \
-		${ECHO_CMD} -n `${AWK} -F\| '$$1 ~ /^${PKGNAME}/ {print $$8;}' ${INDEXDIR}/${INDEXFILE}` ; \
-		${ECHO_CMD} '" to ${.TARGET:C/pretty-print-(.*)-depends-list/\1/}.'; \
+		${ECHO_CMD} -n `${AWK} -F\| "\\$$1 ~ /^${PKGNAME}/ {print \\$$$${fldnum};}" ${INDEXDIR}/${INDEXFILE}` ; \
+		${ECHO_CMD} "\" to $$target."; \
 	fi;
 
 
--- bsd.port.mk_pretty.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060307105244.GA12539>