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():