From 7ac103033c6e5f1f8dcd4bfb061ee48c147faa9c Mon Sep 17 00:00:00 2001 From: Fredrik Eriksson Date: Fri, 1 Mar 2024 07:24:03 +0100 Subject: [PATCH] run emaint after sync --- sau/gentoo.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sau/gentoo.py b/sau/gentoo.py index b3bd814..2fd878a 100644 --- a/sau/gentoo.py +++ b/sau/gentoo.py @@ -9,6 +9,7 @@ EIX_SYNC_PATH='/usr/bin/eix-sync' RC_SERVICE_PATH='/sbin/rc-service' EMERGE_PATH='/usr/bin/emerge' EQUERY_PATH='/usr/bin/equery' +EMAINT_PATH='/usr/sbin/emaint' GRUB_MKCONFIG='/usr/sbin/grub-mkconfig' # parsing output from eix -Ttnc @@ -88,6 +89,17 @@ def _sync_portage(): for line in err.splitlines(): log.warning("stderr: {}".format(line)) + cmd = [ EMAINT_PATH, '-f', 'all' ] + ret, out, err = sau.helpers.exec_cmd(cmd, timeout=3600) + + if ret != 0: + log.warning("emaint failed:") + for line in out.splitlines(): + log.warning("stdout: {}".format(line)) + for line in err.splitlines(): + log.warning("stderr: {}".format(line)) + + def pkg_upgrade():