summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2025-04-18 11:07:54 +0200
committerLuke Bratch <luke@bratch.co.uk>2025-04-18 11:07:54 +0200
commit281a1c3209f516f866439e7482c0eb2760d3f4ff (patch)
treee34b06b9abeb013016684f99810ded5ced161e94
parentbd23b88f6b8e94f81d31b2a39cc6006e7d54f40f (diff)
Layman is deprecated, so use emaint to sync all repositories. This also means no longer using emerge --sync.
-rwxr-xr-xportage-update.sh19
1 files changed, 4 insertions, 15 deletions
diff --git a/portage-update.sh b/portage-update.sh
index a1d9ceb..5b08fb6 100755
--- a/portage-update.sh
+++ b/portage-update.sh
@@ -18,9 +18,7 @@ SAFE_SERVICES="cupsd fail2ban lvmetad ntpd proftpd smartd sshd tor syslog-ng"
while test $# -gt 0
do
case "$1" in
- --skip-sync) export SKIP_SYNC="true" # In case we don't want to --sync the Portage tree
- ;;
- --skip-layman-sync) export SKIP_LAYMAN_SYNC="true" # In case we don't want to --sync-all Layman repos
+ --skip-sync) export SKIP_SYNC="true" # In case we don't want to sync repositories
;;
--skip-news) export SKIP_NEWS="true" # In case we don't want to read new news before continuing
;;
@@ -38,19 +36,10 @@ do
shift
done
-# Sync the Portage tree, unless skipped
+# Sync all repositories configured with auto-sync, unless skipped
if [ -z ${SKIP_SYNC+x} ]; then
- echo 'emerge --sync'
- emerge --sync || exit 1
-fi
-
-# Sync Layman repos, unless skipped
-if [ -z ${SKIP_LAYMAN_SYNC+x} ]; then
- echo 'layman -S'
- # Only try to run layman if the command seems to exist
- if command -v layman > /dev/null; then
- layman -S || exit 1
- fi
+ echo 'emaint sync --auto'
+ emaint sync --auto || (echo "$0: error: failed to sync repositories" ; echo exit 1)
fi
# Check to see if there's any news, unless skipped