On Mon, 8 Feb 2016 18:09:06 +0000 Stuart Henderson <s...@spacehopper.org> wrote: > On 2016/02/08 12:44, dan mclaughlin wrote: > > i am assuming that the distfiles on the cdrom preserve the same structure > > as on the ftp sites and also created during builds. > > This won't have been noticed because there are no distfiles on the > cdrom, PERMIT_DISTFILES_CDROM is no longer permitted in a port, so it > would probably make sense to get rid of CDROM_SITE support as well. > > > to illustrate: > > > > $ env CDROM_SITE=/home/olddistfiles DISTDIR=/home/distfiles make fetch > > ===> Checking files for bash-4.3.42 > > cp: /home/olddistfiles/bash-4.3.30.tar.gz: No such file or directory > > >> Fetch http://ftpmirror.gnu.org/bash/bash-4.3.30.tar.gz > > bash-4.3.30.tar.gz 100% |*******************************| 7790 KB 00:10 > > cp: /home/olddistfiles/bash43-031: No such file or directory > > >> Fetch http://ftpmirror.gnu.org/bash/bash-4.3-patches/bash43-031 > > bash43-031 100% |*************************************| 3689 00:00 > > ... > > For what I think you're trying to do, you can use MASTER_SITE_BACKUP > and MASTER_SITE_OVERRIDE to file:///home/olddistfiles/${DIST_SUBDIR} >
that may be what i want, though i usually use FETCH_SYMLINK_DISTFILES so they don't get copied, which from what i can tell can't be done with MASTER_SITE_*. (i'll work around that if CDROM_SITE is being phased out, if need be.) i found a clear bug with MASTER_SITE_OVERRIDE though: $ env DISTDIR=/home/distfiles MASTER_SITE_OVERRIDE=Yes \ > MASTER_SITE_BACKUP='file:///home/olddistfiles/${DIST_SUBDIR}/' make fetch ===> Checking files for bash-4.3.42 >> Fetch Yesbash-4.3.30.tar.gz ftp: Yesbash-4.3.30.tar.gz: no address associated with name ftp> by it comes from this code: .if ${MASTER_SITE_OVERRIDE:L} == "no" MASTER_SITES := ${MASTER_SITES} ${MASTER_SITE_BACKUP} .else MASTER_SITES := ${MASTER_SITE_OVERRIDE} ${MASTER_SITES} .endif that last OVERRIDE should be BACKUP (since it's obviously prepending the 'Yes' to the file for the url. there's another similar instance too. patch below. --- infrastructure/mk/bsd.port.mk.orig Thu Jan 7 04:25:02 2016 +++ infrastructure/mk/bsd.port.mk Mon Feb 8 13:59:48 2016 @@ -1202,7 +1202,7 @@ MASTER_SITES ?= .if ${MASTER_SITE_OVERRIDE:L} == "no" MASTER_SITES := ${MASTER_SITES} ${MASTER_SITE_BACKUP} .else -MASTER_SITES := ${MASTER_SITE_OVERRIDE} ${MASTER_SITES} +MASTER_SITES := ${MASTER_SITE_BACKUP} ${MASTER_SITES} .endif _warn_checksum = : @@ -1218,7 +1218,7 @@ _warn_checksum += ;echo ">>> MASTER_SITES${_I} not end . if ${MASTER_SITE_OVERRIDE:L} == "no" MASTER_SITES${_I} := ${MASTER_SITES${_I}} ${MASTER_SITE_BACKUP} . else -MASTER_SITES${_I} := ${MASTER_SITE_OVERRIDE} ${MASTER_SITES${_I}} +MASTER_SITES${_I} := ${MASTER_SITE_BACKUP} ${MASTER_SITES${_I}} . endif . endif .endfor but that just reveals a different problem, that it doesn't recognize MASTER_SITE_BACKUP (even though the man page says it is a "User setting"). $ env DISTDIR=/home/distfiles MASTER_SITE_OVERRIDE=Yes \ > MASTER_SITE_BACKUP='file:///home/olddistfiles/${DIST_SUBDIR}/' make fetch ===> Checking files for bash-4.3.42 >> Fetch http://ftp.openbsd.org/pub/OpenBSD/distfiles/bash/bash-4.3.30.tar.gz bash-4.3.30.tar.gz 8% |** | 640 KB --:-- ETA^ adding some echos $ env DISTDIR=/home/distfiles MASTER_SITE_OVERRIDE=Yes \ > MASTER_SITE_BACKUP='file:///home/olddistfiles/' make fetch ===> Checking files for bash-4.3.42 ===> MASTER_SITE_OVERRIDE=Yes ===> MASTER_SITE_BACKUP=http://ftp.openbsd.org/pub/OpenBSD/distfiles/bash/ ftp://ftp.usa.openbsd.org/pub/OpenBSD/distfiles/bash/ http://ftp.fr.openbsd.org/pub/OpenBSD/distfiles/bash/ ===> MASTER_SITES=http://ftp.openbsd.org/pub/OpenBSD/distfiles/bash/ ftp://ftp.usa.openbsd.org/pub/OpenBSD/distfiles/bash/ http://ftp.fr.openbsd.org/pub/OpenBSD/distfiles/bash/ http://ftpmirror.gnu.org/bash/ https://ftp.gnu.org/gnu/bash/ http://ftp.funet.fi/pub/gnu/prep/bash/ ftp://ftp.gnu.org/gnu/bash/ ftp://ftp.cs.tu-berlin.de/pub/gnu/bash/ http://mirrors.dotsrc.org/gnu/bash/ http://ftp.kddilabs.jp/GNU/bash/ http://ftp.nluug.nl/pub/gnu/bash/ >> Fetch http://ftp.openbsd.org/pub/OpenBSD/distfiles/bash/bash-4.3.30.tar.gz bash-4.3.30.tar.gz 13% |**** | 1024 KB --:-- ETA^C http fetch aborted. so it's ignoring the the value being set by the user. now this is a bit of a mystery to me, since i can't find where it is being set at all. $ pwd /usr/ports/infrastructure/mk $ grep MASTER_SITE_BACKUP * bsd.port.mk:MASTER_SITES := ${MASTER_SITES} ${MASTER_SITE_BACKUP} bsd.port.mk:MASTER_SITES := ${MASTER_SITE_BACKUP} ${MASTER_SITES} bsd.port.mk:MASTER_SITES${_I} := ${MASTER_SITES${_I}} ${MASTER_SITE_BACKUP} bsd.port.mk:MASTER_SITES${_I} := ${MASTER_SITE_BACKUP} ${MASTER_SITES${_I}} bsd.port.mk.orig:MASTER_SITES := ${MASTER_SITES} ${MASTER_SITE_BACKUP} bsd.port.mk.orig:MASTER_SITES${_I} := ${MASTER_SITES${_I}} ${MASTER_SITE_BACKUP} i searched my whole src and ports trees and only got: =====> searching tree src ./share/man/man5/bsd.port.mk.5:.It Ev MASTER_SITE_BACKUP ./share/man/man5/bsd.port.mk.5:${MASTER_SITE_BACKUP} sites. =====> searching tree ports ./infrastructure/bin/portcheck:MASTER_SITE_BACKUP ./infrastructure/mk/bsd.port.mk:MASTER_SITES := ${MASTER_SITES} ${MASTER_SITE_BACKUP} ./infrastructure/mk/bsd.port.mk:MASTER_SITES := ${MASTER_SITE_BACKUP} ${MASTER_SITES} ./infrastructure/mk/bsd.port.mk:MASTER_SITES${_I} := ${MASTER_SITES${_I}} ${MASTER_SITE_BACKUP} ./infrastructure/mk/bsd.port.mk:MASTER_SITES${_I} := ${MASTER_SITE_BACKUP} ${MASTER_SITES${_I}} ./infrastructure/mk/bsd.port.mk.orig:MASTER_SITES := ${MASTER_SITES} ${MASTER_SITE_BACKUP} ./infrastructure/mk/bsd.port.mk.orig:MASTER_SITES${_I} := ${MASTER_SITES${_I}} ${MASTER_SITE_BACKUP} ./infrastructure/templates/network.conf.template:MASTER_SITE_BACKUP= ${_MASTER_SITE_OPENBSD} ./infrastructure/templates/network.conf.template:MASTER_SITE_BACKUP= ${_MASTER_SITE_FREEBSD} ./infrastructure/templates/network.conf.template:MASTER_SITE_BACKUP= ${_MASTER_SITE_NETBSD} ./infrastructure/templates/network.conf.template:MASTER_SITE_BACKUP?= \ ./infrastructure/templates/network.conf.template:# Uncomment to retrieve from the MASTER_SITE_BACKUP first ./infrastructure/templates/network.conf.template:# MASTER_SITE_OVERRIDE= ${MASTER_SITE_BACKUP} ./www/pecl-chroot/Makefile:MASTER_SITES= ${MASTER_SITE_BACKUP} ./x11/kde4/kde-release-helper: for URL in $(make MASTER_SITE_BACKUP= show=MASTER_SITES); do ...so i'm curious where it's even getting the values for MASTER_SITE_BACKUP