use eix-sync if it exists - running eix-update after a sync does not
update cache for overlays
This commit is contained in:
parent
712a4e986f
commit
b1c520b257
@ -5,7 +5,7 @@ import re
|
||||
import sau
|
||||
import sau.helpers
|
||||
|
||||
EIX_UPDATE_PATH='/usr/bin/eix-update'
|
||||
EIX_SYNC_PATH='/usr/bin/eix-sync'
|
||||
RC_SERVICE_PATH='/sbin/rc-service'
|
||||
EMERGE_PATH='/usr/bin/emerge'
|
||||
EQUERY_PATH='/usr/bin/equery'
|
||||
@ -78,8 +78,12 @@ def system_upgrade():
|
||||
def _sync_portage():
|
||||
log = logging.getLogger(sau.LOGNAME)
|
||||
|
||||
cmd = [ EMERGE_PATH, '-q', '--sync' ]
|
||||
ret, out, err = sau.helpers.exec_cmd(cmd, timeout=3600)
|
||||
if os.path.exists(EIX_SYNC_PATH):
|
||||
cmd = [ EIX_SYNC_PATH, '-q' ]
|
||||
ret, out, err = sau.helpers.exec_cmd(cmd, timeout=3600)
|
||||
else:
|
||||
cmd = [ EMERGE_PATH, '-q', '--sync' ]
|
||||
ret, out, err = sau.helpers.exec_cmd(cmd, timeout=3600)
|
||||
|
||||
if ret != 0:
|
||||
log.warning("Portage sync failed:")
|
||||
@ -88,16 +92,6 @@ def _sync_portage():
|
||||
for line in err.splitlines():
|
||||
log.warning("stderr: {}".format(line))
|
||||
|
||||
if os.path.exists(EIX_UPDATE_PATH):
|
||||
cmd = [ EIX_UPDATE_PATH, '-q' ]
|
||||
ret, out, err = sau.helpers.exec_cmd(cmd, timeout=3600)
|
||||
|
||||
if ret != 0:
|
||||
log.warning("eix-update failed:")
|
||||
for line in out.splitlines():
|
||||
log.warning("stdout: {}".format(line))
|
||||
for line in err.splitlines():
|
||||
log.warning("stderr: {}".format(line))
|
||||
|
||||
|
||||
def pkg_upgrade():
|
||||
|
Loading…
Reference in New Issue
Block a user