saving uncommitted changes in /etc prior to emerge run
This commit is contained in:
parent
b4eaf2e93f
commit
a3271aff2e
@ -1,24 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.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 repositories.
|
|
||||||
# Should at least include 'gentoo'. Default is all repositories.
|
|
||||||
repository_list=( $(${CAVE} print-repositories --format e) )
|
|
||||||
|
|
||||||
# Number of jobs for egencache, default is number or processors.
|
|
||||||
egencache_jobnum="$(nproc)"
|
|
||||||
|
|
||||||
#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
|
|
||||||
eend $?
|
|
||||||
done
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
|
||||||
source "/etc/paludis/hooks/set_portdir.bash"
|
|
||||||
|
|
||||||
DTDDIR=${PORTDIR}/metadata/dtd
|
|
||||||
ebegin "Updating DTDs"
|
|
||||||
if [[ -e ${DTDDIR} ]]; then
|
|
||||||
git -C "${DTDDIR}" pull -q --ff
|
|
||||||
else
|
|
||||||
git clone -q https://anongit.gentoo.org/git/data/dtd.git "${DTDDIR}"
|
|
||||||
fi
|
|
||||||
eend "$?"
|
|
@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
|
||||||
source "/etc/paludis/hooks/set_portdir.bash"
|
|
||||||
|
|
||||||
GLSADIR=${PORTDIR}/metadata/glsa
|
|
||||||
ebegin "Updating GLSAs"
|
|
||||||
if [[ -e ${GLSADIR} ]]; then
|
|
||||||
git -C "${GLSADIR}" pull -q --ff
|
|
||||||
else
|
|
||||||
git clone -q https://anongit.gentoo.org/git/data/glsa.git "${GLSADIR}"
|
|
||||||
fi
|
|
||||||
eend "$?"
|
|
@ -1,8 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
|
||||||
source "/etc/paludis/hooks/set_portdir.bash"
|
|
||||||
|
|
||||||
ebegin "Updating herds.xml"
|
|
||||||
wget -q -O "${PORTDIR}"/metadata/herds.xml https://api.gentoo.org/packages/herds.xml
|
|
||||||
eend $?
|
|
@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
|
||||||
source "/etc/paludis/hooks/set_portdir.bash"
|
|
||||||
source "/etc/paludis/hooks/util_functions.bash"
|
|
||||||
|
|
||||||
NEWSDIR="${PORTDIR}"/metadata/news
|
|
||||||
ebegin "Updating news items"
|
|
||||||
if [[ -e ${NEWSDIR} ]]; then
|
|
||||||
git -C "${NEWSDIR}" pull -q --ff
|
|
||||||
else
|
|
||||||
git clone -q https://anongit.gentoo.org/git/data/gentoo-news.git "${NEWSDIR}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
eend $? "Try to remove ${PORTDIR}/metadata/news"
|
|
17
paludis/hooks/sync_post/01-sync_gentoo_cache.bash
Normal file
17
paludis/hooks/sync_post/01-sync_gentoo_cache.bash
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
|
source "/etc/paludis/hooks/set_portdir.bash"
|
||||||
|
|
||||||
|
if [[ ${TARGET} == gentoo ]] ; then
|
||||||
|
# Number of jobs for egencache, default is number or processors.
|
||||||
|
egencache_jobnum="$(nproc)"
|
||||||
|
|
||||||
|
# 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 $?
|
||||||
|
|
||||||
|
ebegin "Cache update for repository ${TARGET}"
|
||||||
|
egencache --jobs=${egencache_jobnum} --repo=${TARGET} --update --update-use-local-desc
|
||||||
|
eend $?
|
||||||
|
fi
|
15
paludis/hooks/sync_post/02-sync_gentoo_dtd.bash
Normal file
15
paludis/hooks/sync_post/02-sync_gentoo_dtd.bash
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
|
source "/etc/paludis/hooks/set_portdir.bash"
|
||||||
|
|
||||||
|
if [[ ${TARGET} == gentoo ]] ; then
|
||||||
|
DTDDIR=${PORTDIR}/metadata/dtd
|
||||||
|
ebegin "Updating DTDs"
|
||||||
|
if [[ -e ${DTDDIR} ]]; then
|
||||||
|
git -C "${DTDDIR}" pull -q --ff
|
||||||
|
else
|
||||||
|
git clone -q https://anongit.gentoo.org/git/data/dtd.git "${DTDDIR}"
|
||||||
|
fi
|
||||||
|
eend "$?"
|
||||||
|
fi
|
15
paludis/hooks/sync_post/03-sync_gentoo_glsa.bash
Normal file
15
paludis/hooks/sync_post/03-sync_gentoo_glsa.bash
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
|
source "/etc/paludis/hooks/set_portdir.bash"
|
||||||
|
|
||||||
|
if [[ ${TARGET} == gentoo ]] ; then
|
||||||
|
GLSADIR=${PORTDIR}/metadata/glsa
|
||||||
|
ebegin "Updating GLSAs"
|
||||||
|
if [[ -e ${GLSADIR} ]]; then
|
||||||
|
git -C "${GLSADIR}" pull -q --ff
|
||||||
|
else
|
||||||
|
git clone -q https://anongit.gentoo.org/git/data/glsa.git "${GLSADIR}"
|
||||||
|
fi
|
||||||
|
eend "$?"
|
||||||
|
fi
|
10
paludis/hooks/sync_post/04-sync_gentoo_herds_xml.bash
Normal file
10
paludis/hooks/sync_post/04-sync_gentoo_herds_xml.bash
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
|
source "/etc/paludis/hooks/set_portdir.bash"
|
||||||
|
|
||||||
|
if [[ ${TARGET} == gentoo ]] ; then
|
||||||
|
ebegin "Updating herds.xml"
|
||||||
|
wget -q -O "${PORTDIR}"/metadata/herds.xml https://api.gentoo.org/packages/herds.xml
|
||||||
|
eend $?
|
||||||
|
fi
|
15
paludis/hooks/sync_post/05-sync_gentoo_news.bash
Normal file
15
paludis/hooks/sync_post/05-sync_gentoo_news.bash
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
|
source "/etc/paludis/hooks/set_portdir.bash"
|
||||||
|
|
||||||
|
if [[ ${TARGET} == gentoo ]] ; then
|
||||||
|
NEWSDIR="${PORTDIR}"/metadata/news
|
||||||
|
ebegin "Updating news items"
|
||||||
|
if [[ -e ${NEWSDIR} ]]; then
|
||||||
|
git -C "${NEWSDIR}" pull -q --ff
|
||||||
|
else
|
||||||
|
git clone -q https://anongit.gentoo.org/git/data/gentoo-news.git "${NEWSDIR}"
|
||||||
|
fi
|
||||||
|
eend $? "Try to remove ${PORTDIR}/metadata/news"
|
||||||
|
fi
|
13
paludis/hooks/sync_post/06-sync_overlay_cache.bash
Normal file
13
paludis/hooks/sync_post/06-sync_overlay_cache.bash
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
|
source "/etc/paludis/hooks/set_portdir.bash"
|
||||||
|
|
||||||
|
if [[ ${TARGET} != gentoo && $(${CAVE} print-repository-metadata --raw-name format --format "%v" ${TARGET}) == e ]] ; then
|
||||||
|
# Number of jobs for egencache, default is number or processors.
|
||||||
|
egencache_jobnum="$(nproc)"
|
||||||
|
|
||||||
|
ebegin "Cache update for repository ${TARGET}"
|
||||||
|
egencache --jobs=${egencache_jobnum} --repo=${TARGET} --update --update-use-local-desc
|
||||||
|
eend $?
|
||||||
|
fi
|
@ -1,8 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
|
||||||
|
|
||||||
eend_die() {
|
|
||||||
eend "$@"
|
|
||||||
[[ $1 -ne 0 ]] && exit $1
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user