Subject: Re: Makefile How to prefer distfiles to MASTER_SITES?
To: Ivan Dolezal <ivan.dolezal@vsb.cz>
From: Andrew Brown <atatat@atatdot.net>
List: netbsd-help
Date: 05/22/2002 13:59:08
>recently I wanted to compile pam_ldap (pkgsrc/security/pam-ldap), so I 
>cd' and did make. Oops, the checksum was bad and it didn't want to compile.
>
>I found out that MASTER_SITES points to developer site, but the 
>developer doesn't maintain a package that could compile with NetBSD 1.5.2.
>
>In order to download the "compilable" version, I had to hash 
>MASTER_SITES in Makefile, so that the software downloaded the old 
>version from ftp.netbsd.org to my pleasure.
>
>The question: is there any more systematic way to force Make use 
>ftp.netbsd.org instead of MASTER_SITES source?

from pkgsrc/Packages.txt:

 * fetch:
   This will check if the file(s) given in the variables DISTFILES and
   PATCHFILES (as defined in the package's Makefile) are present on the
   local system in /usr/pkgsrc/distfiles. If they are not present, an
   attempt will be made to fetch them using commands of the form

   ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${site}${file} ${FETCH_AFTER_ARGS}

   where ${site} varies through several possibilities in turn: first,
   ${MASTER_SITE_OVERRIDE} is tried, then the sites specified in either
   ${SITES_file}, if defined, else ${MASTER_SITES} or ${PATCH_SITES}, as
   applies, then finally the value of ${MASTER_SITE_BACKUP}. The order of
   all except the first can be optionally sorted by the user, via setting
   either ${MASTER_SORT_AWK} or ${MASTER_SORT_REGEX}.

so you want to set MASTER_SITE_OVERRIDE.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."