ports/59226: [patch] two small additions to ports/Tools/portbuild/scripts/

Mark Linimon linimon at lonesome.com
Wed Nov 12 20:50:10 UTC 2003


>Number:         59226
>Category:       ports
>Synopsis:       [patch] two small additions to ports/Tools/portbuild/scripts/
>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:   Wed Nov 12 12:50:06 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Mark Linimon
>Release:        FreeBSD 4.9-PRERELEASE i386
>Organization:
Lonesome Dove Computing Services
>Environment:
System: FreeBSD lonesome.lonesome.com 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #0: Fri Sep 5 01:19:33 CDT 2003 linimon at lonesome.lonesome.com:/usr/src/sys/compile/MULTIMEDIA_DEBUG i386
>Description:
	Here are two scripts that I wrote that iterate over the
	entire ports tree and annotate the "useful parts" of
	errors as they find them.  One runs portlint on each
	port, one runs "make describe" on each port.

	Perhaps these can be incorporated into some kind of
	automated testing environment.  I have found them useful.
>How-To-Repeat:
	(n/a)
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	domakedescribe
#	doportlint
#
echo x - domakedescribe
sed 's/^X//' >domakedescribe << 'END-of-domakedescribe'
X#!/bin/sh
X#
Xindexfile=/usr/ports/INDEX
Xtmpfile=/tmp/makedescribe.tmp
X#
Xfailures=0
Xfor i in `sed -e "s/ /_/g" ${indexfile}`; do
X  set $(echo $i | tr \| " ")
X  port=$2
X  cd ${port}
X  make describe > /dev/null 2> ${tmpfile} || \
X  { failures=$(($failures+1)); \
X  echo '--------------- make describe failed for '${port}':'; \
X  cat ${tmpfile}; }
X  rm -f ${tmpfile}
Xdone
Xecho '---------------'
Xecho 'Total number of ports that failed trying to build /usr/ports/INDEX: '${failures}
Xexit ${failures}
END-of-domakedescribe
echo x - doportlint
sed 's/^X//' >doportlint << 'END-of-doportlint'
X#!/bin/sh
X#
Xindexfile=/usr/ports/INDEX
Xtmpfile=/tmp/portlint.tmp
X#
Xfailures=0
Xfor i in `sed -e "s/ /_/g" ${indexfile}`; do
X  set $(echo $i | tr \| " ")
X  port=$2
X  cd ${port}
X  portlint > ${tmpfile} 2> /dev/null || failures=$((${failures}+1))
X  grep '^looks fine\.$' ${tmpfile} > /dev/null 2> /dev/null || \
X  { echo '--------------- portlint results for '${port}; \
X  grep -v '^OK:' ${tmpfile} |\
X  sed -e 's/^0 fatal errors and //'; }
X  rm -f ${tmpfile}
Xdone
Xecho '---------------'
Xecho 'number of ports with fatal errors in portlint: '${failures}
Xexit ${failures}
END-of-doportlint
exit

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



More information about the freebsd-ports-bugs mailing list