sync_cache: Use the rsync cache first

Since updating the cache the first time or after not syncing for a while
takes quite a bit of CPU, we might as well opportunistically utilize the
rsync cache by selectively rsyncing from it, and then running the local
caching operation after.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2015-08-17 12:45:49 +02:00
parent 55ca8134e3
commit d0adcdee45
1 changed files with 1 additions and 0 deletions

View File

@ -5,5 +5,6 @@ source /etc/init.d/functions.sh
source /etc/portage/util-functions.sh
ebegin "Syncing metadata cache"
rsync -avP rsync://rsync.gentoo.org/gentoo-portage/metadata/md5-cache/ "${PORTDIR}"/metadata/md5-cache/
egencache --jobs=8 --repo=gentoo --update --update-use-local-desc
eend $?