Fix for port-Makefiles
R.Brouwer
fbsd at corine-robert.nl
Thu Jan 13 00:53:18 PST 2005
Dear ,
I regularly receive the error "warning: String comparison operator
should be either == or !=" when I rebuild the ports-index.
Or the error: Malformed conditional ((${OSVERSION} < 503001 &&
${OSVERSION} >= 500000) || (${OSVERSION} < 492000))
To prevent these errors I correct all errounious information in port
Makefiles with the following script:
======== fix_makefiles.sh ====
#!/usr/local/bin/bash
FILES=`find /usr/ports/ -name Makefile* -exec egrep -l " [0-9]+[)]" {} \;`
for i in ${FILES}
do
# Process all files with an number and connected )
mv $i $i.old
# Add a space after the number
if [ -f $i.old ] ; then
sed -E "s/( [0-9]+)[)]/\\1 )/g" <$i.old >$i
fi
done
==========================
This script is placed in the daily cron line as follows:
/usr/local/bin/cvsup -g -L 2 /usr/local/etc/ports-supfile -l
/var/run/ports-update.lock >/var/log/ports-update.log ;
/usr/local/bin/fix_makefiles.sh; /usr/local/sbin/portsdb -Uu
I don't know if it is useful to have this functionallity somewhere in
the freebsd software. For me this works just fine.
Kind regards,
Robert Brouwer
More information about the freebsd-ports
mailing list