2015-08-14 13:46:59 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
2015-08-14 19:35:32 +00:00
|
|
|
source "/etc/paludis/hooks/set_portdir.bash"
|
2015-08-19 23:04:52 +00:00
|
|
|
source "/etc/paludis/hooks/util_functions.bash"
|
2015-08-14 13:46:59 +00:00
|
|
|
|
2015-08-19 23:04:52 +00:00
|
|
|
# You may change this to only update cache of specific repositories.
|
|
|
|
# Should at least include 'gentoo'. Default is all repositories.
|
|
|
|
repository_list=( $(${CAVE} print-repositories --format e) )
|
2015-08-14 13:46:59 +00:00
|
|
|
|
2015-08-19 23:04:52 +00:00
|
|
|
# Number of jobs for egencache, default is number or processors.
|
|
|
|
egencache_jobnum="$(nproc)"
|
2015-08-17 15:45:49 +00:00
|
|
|
|
2015-08-19 23:04:52 +00:00
|
|
|
#ebegin "Fetching pre-generated metadata cache for gentoo repository"
|
|
|
|
#rsync -aq rsync://rsync.gentoo.org/gentoo-portage/metadata/md5-cache/ "${PORTDIR}"/metadata/md5-cache/
|
|
|
|
#eend $?
|
|
|
|
|
|
|
|
einfo "Updating metadata cache for repositories:"
|
|
|
|
for _repo in ${repository_list[@]} ; do
|
|
|
|
ebegin " ${_repo}"
|
|
|
|
egencache --jobs=${egencache_jobnum} --repo=${_repo} --update --update-use-local-desc
|
2015-08-17 15:45:49 +00:00
|
|
|
eend $?
|
2015-08-19 23:04:52 +00:00
|
|
|
done
|
2015-08-14 13:46:59 +00:00
|
|
|
|