Makeing fetchindex really mirror INDEX
Simon L. Nielsen
simon at FreeBSD.org
Sun Jan 9 06:39:07 PST 2005
Hello
I patched fetchindex to really only download a new INDEX if it's
changed and to only uncompress INDEX.bz2 it's newer than INDEX. Patch
should be attached.
Any complaints to committing this?
BTW. the mirror mode fetch(1) is broken in at least FreeBSD 5.3 and
newer, but seems to works on 4.10. I have made a patch [1], which I
hope to get committed soon, so if the fetchindex patch don't work for
you that might be the reason.
[1] http://people.freebsd.org/~simon/patches/fetch.mirror.patch
--
Simon L. Nielsen
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/Makefile,v
retrieving revision 1.90
diff -u -d -r1.90 Makefile
--- Makefile 17 Dec 2004 11:23:22 -0000 1.90
+++ Makefile 9 Jan 2005 14:21:13 -0000
@@ -70,7 +70,12 @@
@cd ${.CURDIR} && make ${.CURDIR}/${INDEXFILE}
fetchindex:
- @cd ${.CURDIR} && ${FETCHINDEX} ${MASTER_SITE_INDEX}/${INDEXFILE}.bz2 && bunzip2 -f ${INDEXFILE}.bz2 && chmod a+r ${INDEXFILE}
+ @${FETCHINDEX} -o ${.CURDIR}/${INDEXFILE}.bz2 \
+ ${MASTER_SITE_INDEX}${INDEXFILE}.bz2
+ @cd ${.CURDIR} && if [ ${INDEXFILE}.bz2 -nt ${INDEXFILE} ]; then \
+ bunzip2 < ${INDEXFILE}.bz2 > ${INDEXFILE}; \
+ chmod a+r ${INDEXFILE}; \
+ fi
MASTER_SITE_INDEX?= http://www.FreeBSD.org/ports/
FETCHINDEX?= fetch -am
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20050109/55f61703/attachment.bin
More information about the freebsd-ports
mailing list