[scripts] remove mangling of repositories.conf.d
This commit is contained in:
@@ -69,6 +69,8 @@ if [ -n "${UPGRADE_REPO}" ]; then
|
||||
echo "Upgrading system by enabling ${UPGRADE_REPO}"
|
||||
equo repo enable "${UPGRADE_REPO}" || exit 1
|
||||
FORCE_EAPI=2 safe_run equo update || exit 1
|
||||
|
||||
equo repo mirrorsort "${UPGRADE_REPO}" # ignore errors
|
||||
ETP_NONINTERACTIVE=1 safe_run equo upgrade --fetch || exit 1
|
||||
ETP_NONINTERACTIVE=1 equo upgrade --purge || exit 1
|
||||
echo "-5" | equo conf update
|
||||
@@ -163,14 +165,6 @@ umount /proc
|
||||
equo deptest --pretend
|
||||
emaint --fix world
|
||||
|
||||
# copy entropy repositories config
|
||||
# the one in chroots is optimized to use Garr mirror
|
||||
cp /etc/entropy/repositories.conf.example /etc/entropy/repositories.conf -p
|
||||
for repo_conf in /etc/entropy/repositories.conf.d/entropy_*.example; do
|
||||
new_repo_conf="${repo_conf%.example}"
|
||||
cp "${repo_conf}" "${new_repo_conf}"
|
||||
done
|
||||
|
||||
# copy Portage config from sabayonlinux.org entropy repo to system
|
||||
for conf in package.mask package.unmask package.keywords make.conf package.use; do
|
||||
repo_path=/var/lib/entropy/client/database/*/sabayonlinux.org/standard
|
||||
|
||||
@@ -42,10 +42,13 @@ safe_run() {
|
||||
return 0
|
||||
}
|
||||
|
||||
export FORCE_EAPI=2
|
||||
safe_run equo update || exit 1
|
||||
FORCE_EAPI=2 safe_run equo update || exit 1
|
||||
|
||||
for repo in $(equo repo list -q); do
|
||||
echo "Optimizing mirrors for ${repo}"
|
||||
equo repo mirrorsort "${repo}" # ignore errors
|
||||
done
|
||||
|
||||
export ETP_NONINTERACTIVE=1
|
||||
safe_run equo upgrade --fetch || exit 1
|
||||
equo upgrade --purge || exit 1
|
||||
equo remove "${PACKAGES_TO_REMOVE[@]}" # ignore
|
||||
|
||||
@@ -25,15 +25,11 @@ safe_run() {
|
||||
# make sure there is no stale pid file around that prevents entropy from running
|
||||
rm -f /var/run/entropy/entropy.lock
|
||||
|
||||
# disable all mirrors but GARR
|
||||
for repo_conf in /etc/entropy/repositories.conf.d/entropy_*; do
|
||||
# skip .example files
|
||||
if [[ "${repo_conf}" =~ .*\.example$ ]]; then
|
||||
echo "skipping ${repo_conf}"
|
||||
continue
|
||||
fi
|
||||
sed -n -e "/^pkg = .*pkg.sabayon.org/p" -e "/^repo = .*pkg.sabayon.org/p" \
|
||||
-e "/garr.it/p" -e "/^\[.*\]$/p" -i "${repo_conf}"
|
||||
FORCE_EAPI=2 safe_run equo update || exit 1
|
||||
|
||||
for repo in $(equo repo list -q); do
|
||||
echo "Optimizing mirrors for ${repo}"
|
||||
equo repo mirrorsort "${repo}" # ignore errors
|
||||
done
|
||||
|
||||
FORCE_EAPI=2 safe_run equo update || exit 1
|
||||
exit 0
|
||||
|
||||
@@ -285,13 +285,6 @@ setup_installed_packages() {
|
||||
rm /var/lib/entropy/client/database/*/sabayon-weekly -rf
|
||||
equo rescue vacuum
|
||||
|
||||
# restore original repositories.conf (all mirrors were filtered for speed)
|
||||
cp /etc/entropy/repositories.conf.example /etc/entropy/repositories.conf || exit 1
|
||||
for repo_conf in /etc/entropy/repositories.conf.d/entropy_*.example; do
|
||||
new_repo_conf="${repo_conf%.example}"
|
||||
cp "${repo_conf}" "${new_repo_conf}"
|
||||
done
|
||||
|
||||
# cleanup log dir
|
||||
rm /var/lib/entropy/logs -rf
|
||||
rm -rf /var/lib/entropy/*cache*
|
||||
|
||||
Reference in New Issue
Block a user