Subject: pkg/6996: Enhancement to packages system
To: None <gnats-bugs@gnats.netbsd.org>
From: None <darcy@druid.net>
List: netbsd-bugs
Date: 02/13/1999 13:10:42
>Number:         6996
>Category:       pkg
>Synopsis:       Allows a site to cache distfiles
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 13 10:20:01 1999
>Last-Modified:
>Originator:     D'Arcy J.M. Cain
>Organization:
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.
>Release:        NetBSD-current
>Environment:
	
System: NetBSD druid 1.3I NetBSD 1.3I (DRUID) #0: Sat Feb 6 13:15:04 EST 1999 darcy@druid:/usr/src/sys/arch/i386/compile/DRUID i386


>Description:
	I have a few machines on my net and I often build for clients.  If
	I build them a package I would like to leave the distribution file
	on their system when I deliver it so I can't use some NFS solution.
	I felt that it would be nice if I could always check my master site
	before checking the ones in the system or package.
>How-To-Repeat:
	N/A
>Fix:
	The following patch allows you to add a "CACHE_SITES =" line to
	/etc/mk.conf and this (these) will be checked first before going
	out to the net.

*** bsd.pkg.mk	1999/02/13 17:54:47	1.1
--- bsd.pkg.mk	1999/02/13 18:07:20
***************
*** 492,499 ****
--- 492,504 ----
  	ftp://ftp.funet.fi/pub/mirrors/sunsite.unc.edu/pub/Linux/%SUBDIR%/
  
  # Empty declaration to avoid "variable MASTER_SITES recursive" error
+ CACHE_SITES?=
  MASTER_SITES?=
  PATCH_SITES?=
+ 
+ # Check our local cache site(s) first
+ MASTER_SITES:=	${CACHE_SITES} ${MASTER_SITES}
+ PATCH_SITES:=	${CACHE_SITES} ${PATCH_SITES}
  
  # Substitute subdirectory names
  MASTER_SITES:=	${MASTER_SITES:S/%SUBDIR%/${MASTER_SITE_SUBDIR}/}
>Audit-Trail:
>Unformatted: