ports/166188: building port index uses obsolete sort syntax

Lowell Gilbert lgfbsd at be-well.ilk.org
Fri Mar 16 22:30:01 UTC 2012


>Number:         166188
>Category:       ports
>Synopsis:       building port index uses obsolete sort syntax
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 16 22:30:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Lowell Gilbert
>Release:        FreeBSD 8.3-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD lowell-desk.lan 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #67: Fri Mar 2 19:19:41 EST 2012 root at lowell-desk.lan:/usr/obj/usr/src/sys/LOWELL64 amd64


	
>Description:

ports/Makefile uses a very old syntax for sort(1) in building an INDEX file. 

	
>How-To-Repeat:

Try to build INDEX with textproc/bsdsort.
Trying to force Gnu sort into POSIX mode might do it also.

	
>Fix:

	

I'm not 100% sure of the field counts in the patch, because the old
syntax isn't very precisely documented. I did some quick tests to
check it, though, so I think it's probably correct.

--- /usr/ports/Makefile.orig    2011-05-04 18:33:13.000000000 -0400
+++ /usr/ports/Makefile 2012-03-16 17:56:25.000000000 -0400
@@ -138,7 +138,7 @@
                exit 1); \
        cat $${tmpdir}/${INDEXFILE}.desc.* | (cd ${.CURDIR} ; perl ${.CURDIR}/Tools/make_index) | \
                sed -e 's/  */ /g' -e 's/|  */|/g' -e 's/  *|/|/g' -e 's./..g' | \
-               sort -t '|' +1 -2 | \
+               sort -t '|' -k2,3 | \
                sed -e 's../.g' > ${INDEXDIR}/${INDEXFILE}.tmp; \
        if [ "${INDEX_PRISTINE}" != "" ]; then \
                sed -e "s,$${LOCALBASE},/usr/local," ${INDEXDIR}/${INDEXFILE}.tmp > ${INDEXDIR}/${INDEXFILE}; \
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list