contrib/openrc/init.d/package-cache: Don't include 'distfiles' in source
authorW. Trevor King <wking@tremily.us>
Fri, 21 Feb 2014 05:36:38 +0000 (21:36 -0800)
committerW. Trevor King <wking@tremily.us>
Fri, 21 Feb 2014 05:36:38 +0000 (21:36 -0800)
Portage will request ${MIRROR}/distfiles/${FILENAME}, so we don't want
the 'distfiles' part in the source directory.  With the shift, we can
also use a single cache for both source (distfiles) and binary
packages (PKGDIR, which defaults to /usr/portage/packages) if there
are any binary packages on the upstream mirror.

contrib/openrc/init.d/package-cache

index d8a9a97fd333fc01f220ef82f64c4f9f46628f39..e7c75bd30ad5e8b2abc2147a4339f5dfbb215ec7 100755 (executable)
@@ -2,10 +2,10 @@
 
 PC_USER="${PC_USER:-package-cache}"
 PC_GROUP="${PC_GROUP:-portage}"
 
 PC_USER="${PC_USER:-package-cache}"
 PC_GROUP="${PC_GROUP:-portage}"
-CACHE_DIR="${CACHE_DIR:-/usr/portage/distfiles}"
+CACHE_DIR="${CACHE_DIR:-/usr/portage}"
 HOST="${HOST:-0.0.0.0}"
 PORT="${PORT:-4000}"
 HOST="${HOST:-0.0.0.0}"
 PORT="${PORT:-4000}"
-SOURCES="${SOURCES:-http://distfiles.gentoo.org/distfiles}"
+SOURCES="${SOURCES:-http://distfiles.gentoo.org}"
 SOURCE_OPTS=()
 for SOURCE in ${SOURCES}
 do
 SOURCE_OPTS=()
 for SOURCE in ${SOURCES}
 do