saving uncommitted changes in /etc prior to emerge run
This commit is contained in:
parent
f1152efd00
commit
8a3ba2ad7e
@ -118,6 +118,7 @@ if [[
|
|||||||
"${CATEGORY}/${PN}" != "sys-apps/paludis" &&
|
"${CATEGORY}/${PN}" != "sys-apps/paludis" &&
|
||||||
"${CATEGORY}/${PN}" != "dev-libs/crypto++" &&
|
"${CATEGORY}/${PN}" != "dev-libs/crypto++" &&
|
||||||
"${CATEGORY}/${PN}" != "sys-power/iasl" &&
|
"${CATEGORY}/${PN}" != "sys-power/iasl" &&
|
||||||
|
"${CATEGORY}/${PN}" != "net-libs/libmnl" &&
|
||||||
"${CATEGORY}/${PN}" != "x11-libs/pixman"
|
"${CATEGORY}/${PN}" != "x11-libs/pixman"
|
||||||
]]
|
]]
|
||||||
then
|
then
|
||||||
|
@ -1,13 +1,34 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
|
|
||||||
source "/etc/paludis/hooks/set_portdir.bash"
|
source "/etc/paludis/hooks/set_portdir.bash"
|
||||||
|
|
||||||
|
overlay_list=(
|
||||||
|
arx-libertatis
|
||||||
|
desktop-overlay
|
||||||
|
dotnet
|
||||||
|
games-overlay
|
||||||
|
haskell
|
||||||
|
hasufell-overlay
|
||||||
|
libressl
|
||||||
|
media-overlay
|
||||||
|
prism-overlay
|
||||||
|
qt
|
||||||
|
torbrowser
|
||||||
|
tox-overlay
|
||||||
|
)
|
||||||
|
|
||||||
einfo "syncing metadata cache"
|
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
|
||||||
|
|
||||||
for i in gentoo games-overlay desktop-overlay media-overlay prism-overlay libressl arx-libertatis dotnet haskell qt sage-on-gentoo torbrowser tox-overlay hasufell-overlay; do
|
|
||||||
egencache --jobs=8 --repo=${i} --update --update-use-local-desc \
|
|
||||||
|| die "egencache failed for overlay ${i}!"
|
|
||||||
done
|
|
||||||
|
@ -1,17 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
|
|
||||||
source "/etc/paludis/hooks/set_portdir.bash"
|
source "/etc/paludis/hooks/set_portdir.bash"
|
||||||
|
|
||||||
|
DTDDIR=${PORTDIR}/metadata/dtd
|
||||||
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"
|
ebegin "Updating DTDs"
|
||||||
if [[ -e dtd ]] ; then
|
if [[ -e ${DTDDIR} ]]; then
|
||||||
einfo "dtd dir already exists, updating..."
|
git -C "${DTDDIR}" pull --ff
|
||||||
cd dtd || die "could not cd into 'dtd'!"
|
|
||||||
git pull --ff || die "could not pull updates!"
|
|
||||||
else
|
else
|
||||||
einfo "dtd directory does not exist, cloning..."
|
git clone https://anongit.gentoo.org/git/data/dtd.git "${DTDDIR}"
|
||||||
git clone https://anongit.gentoo.org/git/data/dtd.git || die "could not clone repository!"
|
|
||||||
fi
|
fi
|
||||||
|
eend "$?"
|
||||||
|
|
||||||
|
@ -1,17 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
|
|
||||||
source "/etc/paludis/hooks/set_portdir.bash"
|
source "/etc/paludis/hooks/set_portdir.bash"
|
||||||
|
|
||||||
|
GLSADIR=${PORTDIR}/metadata/glsa
|
||||||
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"
|
ebegin "Updating GLSAs"
|
||||||
if [[ -e glsa ]] ; then
|
if [[ -e ${GLSADIR} ]]; then
|
||||||
einfo "glsa dir already exists, updating..."
|
git -C "${GLSADIR}" pull --ff
|
||||||
cd glsa || die "could not cd into 'glsa'!"
|
|
||||||
git pull --ff || die "could not pull updates!"
|
|
||||||
else
|
else
|
||||||
einfo "glsa directory does not exist, cloning..."
|
git clone https://anongit.gentoo.org/git/data/glsa.git "${GLSADIR}"
|
||||||
git clone https://anongit.gentoo.org/git/data/glsa.git || die "could not clone repository!"
|
|
||||||
fi
|
fi
|
||||||
|
eend "$?"
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
|
|
||||||
source "/etc/paludis/hooks/set_portdir.bash"
|
source "/etc/paludis/hooks/set_portdir.bash"
|
||||||
|
|
||||||
|
ebegin "Updating herds.xml"
|
||||||
|
wget -O "${PORTDIR}"/metadata/herds.xml https://api.gentoo.org/packages/herds.xml
|
||||||
|
eend $?
|
||||||
|
|
||||||
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"
|
|
||||||
[[ -e "${PORTDIR}"/metadata/herds.xml ]] && { rm "${PORTDIR}"/metadata/herds.xml || die "failed to rm herds.xml!" ;}
|
|
||||||
wget https://gitweb.gentoo.org/data/api.git/plain/files/packages/herds.xml || die "failed to wget herds.xml"
|
|
||||||
|
@ -3,23 +3,25 @@
|
|||||||
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
|
source "${PALUDIS_EBUILD_DIR}/die_functions.bash"
|
||||||
source "/etc/paludis/hooks/set_portdir.bash"
|
source "/etc/paludis/hooks/set_portdir.bash"
|
||||||
|
source "/etc/paludis/hooks/util_functions.bash"
|
||||||
|
|
||||||
|
NEWSDIR="${PORTDIR}"/metadata/news
|
||||||
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"
|
ebegin "Updating news items"
|
||||||
if [[ -e news ]] ; then
|
if [[ -e ${NEWSDIR} ]]; then
|
||||||
einfo "news dir already exists, updating..."
|
git -C "${NEWSDIR}" pull --ff
|
||||||
cd news || die "could not cd into 'news'!"
|
|
||||||
git pull --ff || die "could not pull updates!"
|
|
||||||
else
|
else
|
||||||
einfo "glsa directory does not exist, cloning..."
|
git clone https://anongit.gentoo.org/git/proj/gentoo-news.git "${NEWSDIR}"
|
||||||
git clone https://anongit.gentoo.org/git/proj/gentoo-news.git news || die "could not clone repository!"
|
|
||||||
fi
|
fi
|
||||||
|
eend_die $?
|
||||||
|
|
||||||
cd "${PORTDIR}"/metadata/news || die "failed to cd into ${PORTDIR}/metadata/news"
|
ebegin "Cleaning news git repo"
|
||||||
git clean -fdxq || die "failed to clean git repo!"
|
git -C "${NEWSDIR}" clean -fdxq
|
||||||
|
eend_die $?
|
||||||
|
|
||||||
if [[ -n "$(find . -mindepth 1 -maxdepth 1 -type d -name "*-*-*")" ]] ; then
|
[[ -n "$(find "${NEWSDIR}" -mindepth 1 -maxdepth 1 -type d -name "*-*-*")" ]] &&
|
||||||
die "it seems the repository format of proj/gentoo-news has changed! Update your script!"
|
die "it seems the repository format of proj/gentoo-news has changed! Update your script!"
|
||||||
else
|
|
||||||
cp -a */* . || die "could not copy news dirs to base news dir!"
|
ebegin "Copying news to base directory"
|
||||||
fi
|
cp -a "${NEWSDIR}"/*/* "${NEWSDIR}"
|
||||||
|
eend $?
|
||||||
|
|
||||||
|
8
paludis/hooks/util_functions.bash
Normal file
8
paludis/hooks/util_functions.bash
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
|
||||||
|
|
||||||
|
eend_die() {
|
||||||
|
eend "$@"
|
||||||
|
[[ $1 -ne 0 ]] && exit $1
|
||||||
|
}
|
@ -907,3 +907,5 @@ dev-perl/LWP-UserAgent-Cached ~amd64
|
|||||||
|
|
||||||
# testing exiv-2.5
|
# testing exiv-2.5
|
||||||
media-sound/xmp ~amd64
|
media-sound/xmp ~amd64
|
||||||
|
|
||||||
|
~net-libs/libmnl-1.0.3 ~amd64
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
nameserver 8.8.8.8
|
nameserver 8.8.8.8
|
||||||
nameserver 192.168.0.1
|
nameserver 192.168.0.1
|
||||||
nameserver 192.168.0.2
|
nameserver 192.168.0.2
|
||||||
nameserver 2a02:908:2:1108::11
|
nameserver 2001:4860:4860::8888
|
||||||
nameserver 2a02:908:2:1107::11
|
nameserver 2001:4860:4860::8844
|
||||||
|
Loading…
Reference in New Issue
Block a user