saving uncommitted changes in /etc prior to emerge run
This commit is contained in:
parent
d060b25073
commit
66efb243e9
@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
# set PORTDIR
|
# set PORTDIR
|
||||||
|
|
||||||
PORTDIR="$(${CAVE} print-repository-metadata --raw-name location gentoo)"
|
PORTDIR="$(${CAVE} print-repository-metadata --format '%v' --raw-name location gentoo)"
|
||||||
PORTDIR="${PORTDIR#location=}"
|
|
||||||
|
|
||||||
if [[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] ; then
|
if [[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] ; then
|
||||||
die "PORTDIR empty or pointing to root!"
|
die "PORTDIR empty or pointing to root!"
|
||||||
|
@ -2,23 +2,23 @@
|
|||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
source "/etc/paludis/hooks/set_portdir.bash"
|
source "/etc/paludis/hooks/set_portdir.bash"
|
||||||
|
source "/etc/paludis/hooks/util_functions.bash"
|
||||||
|
|
||||||
# you may change this to only update cache of specific overlays
|
# You may change this to only update cache of specific repositories.
|
||||||
overlay_list=(
|
# Should at least include 'gentoo'. Default is all repositories.
|
||||||
$(${CAVE} print-repositories | grep -vE '(^gentoo$|^installed$|^installed-unpackaged$|^layman$|^paludis-overlay$|^repository$)')
|
repository_list=( $(${CAVE} print-repositories --format e) )
|
||||||
)
|
|
||||||
|
|
||||||
ebegin "Syncing metadata cache for gentoo repository"
|
# Number of jobs for egencache, default is number or processors.
|
||||||
#rsync -avPq rsync://rsync.gentoo.org/gentoo-portage/metadata/md5-cache/ "${PORTDIR}"/metadata/md5-cache/
|
egencache_jobnum="$(nproc)"
|
||||||
egencache --jobs=$(nproc) --repo=gentoo --update --update-use-local-desc
|
|
||||||
eend $?
|
|
||||||
|
|
||||||
if [[ ${#overlay_list[@]} -gt 0 ]] ; then
|
#ebegin "Fetching pre-generated metadata cache for gentoo repository"
|
||||||
ebegin "Syncing metadata cache for overlays"
|
#rsync -aq rsync://rsync.gentoo.org/gentoo-portage/metadata/md5-cache/ "${PORTDIR}"/metadata/md5-cache/
|
||||||
for _overlay in ${overlay_list[@]} ; do
|
#eend $?
|
||||||
einfo " ${_overlay}"
|
|
||||||
egencache --jobs=$(nproc) --repo=${_overlay} --update --update-use-local-desc
|
einfo "Updating metadata cache for repositories:"
|
||||||
done
|
for _repo in ${repository_list[@]} ; do
|
||||||
|
ebegin " ${_repo}"
|
||||||
|
egencache --jobs=${egencache_jobnum} --repo=${_repo} --update --update-use-local-desc
|
||||||
eend $?
|
eend $?
|
||||||
fi
|
done
|
||||||
|
|
||||||
|
@ -6,9 +6,8 @@ source "/etc/paludis/hooks/set_portdir.bash"
|
|||||||
DTDDIR=${PORTDIR}/metadata/dtd
|
DTDDIR=${PORTDIR}/metadata/dtd
|
||||||
ebegin "Updating DTDs"
|
ebegin "Updating DTDs"
|
||||||
if [[ -e ${DTDDIR} ]]; then
|
if [[ -e ${DTDDIR} ]]; then
|
||||||
git -C "${DTDDIR}" pull --ff
|
git -C "${DTDDIR}" pull -q --ff
|
||||||
else
|
else
|
||||||
git clone https://anongit.gentoo.org/git/data/dtd.git "${DTDDIR}"
|
git clone -q https://anongit.gentoo.org/git/data/dtd.git "${DTDDIR}"
|
||||||
fi
|
fi
|
||||||
eend "$?"
|
eend "$?"
|
||||||
|
|
||||||
|
@ -6,9 +6,8 @@ source "/etc/paludis/hooks/set_portdir.bash"
|
|||||||
GLSADIR=${PORTDIR}/metadata/glsa
|
GLSADIR=${PORTDIR}/metadata/glsa
|
||||||
ebegin "Updating GLSAs"
|
ebegin "Updating GLSAs"
|
||||||
if [[ -e ${GLSADIR} ]]; then
|
if [[ -e ${GLSADIR} ]]; then
|
||||||
git -C "${GLSADIR}" pull --ff
|
git -C "${GLSADIR}" pull -q --ff
|
||||||
else
|
else
|
||||||
git clone https://anongit.gentoo.org/git/data/glsa.git "${GLSADIR}"
|
git clone -q https://anongit.gentoo.org/git/data/glsa.git "${GLSADIR}"
|
||||||
fi
|
fi
|
||||||
eend "$?"
|
eend "$?"
|
||||||
|
|
||||||
|
@ -4,6 +4,5 @@ source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
|||||||
source "/etc/paludis/hooks/set_portdir.bash"
|
source "/etc/paludis/hooks/set_portdir.bash"
|
||||||
|
|
||||||
ebegin "Updating herds.xml"
|
ebegin "Updating herds.xml"
|
||||||
wget -O "${PORTDIR}"/metadata/herds.xml https://api.gentoo.org/packages/herds.xml
|
wget -q -O "${PORTDIR}"/metadata/herds.xml https://api.gentoo.org/packages/herds.xml
|
||||||
eend $?
|
eend $?
|
||||||
|
|
||||||
|
@ -7,9 +7,9 @@ source "/etc/paludis/hooks/util_functions.bash"
|
|||||||
NEWSDIR="${PORTDIR}"/metadata/news
|
NEWSDIR="${PORTDIR}"/metadata/news
|
||||||
ebegin "Updating news items"
|
ebegin "Updating news items"
|
||||||
if [[ -e ${NEWSDIR} ]]; then
|
if [[ -e ${NEWSDIR} ]]; then
|
||||||
git -C "${NEWSDIR}" pull --ff
|
git -C "${NEWSDIR}" pull -q --ff
|
||||||
else
|
else
|
||||||
git clone https://anongit.gentoo.org/git/proj/gentoo-news.git "${NEWSDIR}"
|
git clone -q https://anongit.gentoo.org/git/proj/gentoo-news.git "${NEWSDIR}"
|
||||||
fi
|
fi
|
||||||
eend_die $?
|
eend_die $?
|
||||||
|
|
||||||
|
@ -6,3 +6,4 @@ eend_die() {
|
|||||||
eend "$@"
|
eend "$@"
|
||||||
[[ $1 -ne 0 ]] && exit $1
|
[[ $1 -ne 0 ]] && exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user