web FreeBSD Ports Search is out of sync

Matthew Seaman m.seaman at infracaninophile.co.uk
Sun Dec 2 08:50:04 UTC 2012

On 02/12/2012 08:22, Ion-Mihai Tetcu wrote:
> You might want to try ports-mgmt/p5-FreeBSD-Portindex
> cache-init(1) will take that half an hour, but after that updating the
> INDEX will take a minute or so (depending on what has changed in the PT
> since your last update). Also you'll have an INDEX that reflects your
> local settings (make.conf, OPTIONS).

Thanks for the recommendation.  Always glad to hear that people a making
use of my code.

>  # m /root/bin/ports_upd.sh 
> #!/bin/sh
> DATE=`date "+%Y-%m-%d_%H_%M_%S"`
> LOG_DIR=/var/log/ports
> PSNAP_LOG=${LOG_DIR}/psnap.${DATE}
> /usr/sbin/portsnap fetch
> /usr/sbin/portsnap update | tee ${PSNAP_LOG}
> /usr/local/bin/cache-update -f plain,options -i ${PSNAP_LOG}  | tee ${PSNAP_LOG}.cu 

Actually, nowadays you don't need to save the output of portsnap or
cvsup or whatever, and use '-f plain,options' to parse that. The changes
in version 2.8 mean portindex can detect when the timestamp on any ports
Makefile or pkg-descr file or the options saved in /var/db/ports has
changed, and determine what ports it needs to recheck from that, so it's
completely independent of the mechanism[*] used to update the tree.
This doesn't really take significantly more or less time than the old
'parse the logfile' approach -- all those make invocations are the slow

Just run 'cache-update' without arguments.

> grep -qv 'Nothing to do'  ${PSNAP_LOG}.cu && \
>   /usr/local/bin/portindex -v -o ${PORTSDIR}/INDEX-9
> portmaster -L --no-index-fetch --index | egrep -B1 '(ew|ort) version|Aborting|installed|dependencies|IGNORE|marked|Reason:|MOVED' | grep -v '^--'



[*] And less error prone.

Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew at infracaninophile.co.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 266 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20121202/0a4df62f/attachment.sig>

More information about the freebsd-ports mailing list