saving uncommitted changes in /etc prior to emerge run

This commit is contained in:
2015-08-18 13:48:00 +02:00
committed by Hans Wurst
parent d93ffe484b
commit f6ca5d820a
15 changed files with 25 additions and 9 deletions

View File

@@ -0,0 +1,24 @@
#!/bin/bash
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
source "/etc/paludis/hooks/set_portdir.bash"
# you may change this to only update cache of specific overlays
overlay_list=(
$(${CAVE} print-repositories | grep -vE '(^gentoo$|^installed$|^installed-unpackaged$|^layman$|^paludis-overlay$|^repository$)')
)
ebegin "Syncing metadata cache for gentoo repository"
#rsync -avPq rsync://rsync.gentoo.org/gentoo-portage/metadata/md5-cache/ "${PORTDIR}"/metadata/md5-cache/
egencache --jobs=$(nproc) --repo=gentoo --update --update-use-local-desc
eend $?
if [[ ${#overlay_list[@]} -gt 0 ]] ; then
ebegin "Syncing metadata cache for overlays"
for _overlay in ${overlay_list[@]} ; do
einfo " ${_overlay}"
egencache --jobs=$(nproc) --repo=${_overlay} --update --update-use-local-desc
done
eend $?
fi