run emaint after sync

This commit is contained in:
Fredrik Eriksson 2024-03-01 07:24:03 +01:00
parent 3ac30e5539
commit 7ac103033c
Signed by: feffe
GPG Key ID: E6B5580B853D322B

View File

@ -9,6 +9,7 @@ EIX_SYNC_PATH='/usr/bin/eix-sync'
RC_SERVICE_PATH='/sbin/rc-service' RC_SERVICE_PATH='/sbin/rc-service'
EMERGE_PATH='/usr/bin/emerge' EMERGE_PATH='/usr/bin/emerge'
EQUERY_PATH='/usr/bin/equery' EQUERY_PATH='/usr/bin/equery'
EMAINT_PATH='/usr/sbin/emaint'
GRUB_MKCONFIG='/usr/sbin/grub-mkconfig' GRUB_MKCONFIG='/usr/sbin/grub-mkconfig'
# parsing output from eix -Ttnc # parsing output from eix -Ttnc
@ -88,6 +89,17 @@ def _sync_portage():
for line in err.splitlines(): for line in err.splitlines():
log.warning("stderr: {}".format(line)) 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(): def pkg_upgrade():