Or use my script...
It's not perfect, I'm still working out a few small caveats. Sometimes you get false positives in the logfiles.
refresh:
Code:
#!/bin/sh
## CONFIG section
# Where the script resides
WP=/root/updates
## INIT section, don't change
udate=`stat -f %Sa -t %Y%m%d $WP/$0.meta`
if [ -n "$udate" ]; then
ucmd="-d $udate";
fi;
if [ "$1" == "new" ]; then
> $WP/refresh-updating.log;
fi
## MAIN section
portsnap fetch update && portmaster -L | tee portmaster.log && grep New portmaster.log > $WP/$0.log
for a in `cat $WP/$0.log | cut -d ' ' -f5 | cut -d '-' -f1`; do
pkg updating $ucmd $a >> $WP/$0-updating.log;
done
touch $WP/$0.meta
And '
update':
Code:
#!/bin/sh
portmaster -a\
| tee /root/updates/$0$1.log
Optionally you can add
-x behind all this to exclude some packages from updating.
How does this work?
It's all in 'refresh'. It will update the Ports collection, use Portmaster to scan for new ports and then check those new ports for any occurrences in
/usr/ports/UPDATING which entries will then be added to
refresh-updating.log in the same directory (assuming you called the script 'refresh' of course).
Place it in a directory, point the script to the directory its in (I know I can automate this, it's on the todo) and then you're ok.
It will generate a so called 'semaphore file' called
refresh.meta in order to keep track of the last time and date which the script ran.
It also outposts the full list generated by Portmaster (conveniently called
portmaster.log) which can help you work out common issues not mentioned in
/usr/ports/UPDATING (such as the removal of a port for example[/file].
Disclaimer: it's not full proof. But it does a good job for me so far.