From 11fbadb5dc68d1c3e85af6adafb769cb4e1d8058 Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Wed, 18 Jul 2018 13:15:37 -0400 Subject: [PATCH] also fix the broken repo key, just in case a few people got stuck there --- scripts/pentoo-updater.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/pentoo-updater.sh b/scripts/pentoo-updater.sh index a4861a88d..af6451eae 100755 --- a/scripts/pentoo-updater.sh +++ b/scripts/pentoo-updater.sh @@ -53,8 +53,20 @@ if [ -n "${clst_target}" ]; then #we are in catalyst emerge --info > /var/log/portage/emerge-info/emerge-info-$(date "+%Y%m%d").txt else #we are on a user system if ! emerge --sync; then - printf "emerge --sync failed, aborting update for safety\n" - exit 1 + if [ -e /etc/portage/repos.conf/pentoo.conf ] && grep -q pentoo.asc /etc/portage/repos.conf/pentoo.conf; then + printf "Pentoo repo key incorrectly defined, fixing..." + sed -i 's#pentoo.asc#pentoo-keyring.asc#' /etc/portage/repos.conf/pentoo.conf + if grep -q pentoo.asc /etc/portage/repos.conf/pentoo.conf; then + printf "FAILED\n" + exit 1 + else + printf "OK\n" + printf "Please re-run pentoo-updater.\n" + fi + else + printf "emerge --sync failed, aborting update for safety\n" + exit 1 + fi fi check_profile if [ -d /var/db/repos/pentoo ] && [ -d /var/lib/layman/pentoo ]; then