only upgrade on freebsd if no package require manual attention
This commit is contained in:
parent
d0cb0d1124
commit
6f19bf71ca
@ -152,9 +152,11 @@ def pkg_upgrade():
|
|||||||
log.debug('configured level {} < pkg level {}'.format(diff, pkg['upgrade_level']))
|
log.debug('configured level {} < pkg level {}'.format(diff, pkg['upgrade_level']))
|
||||||
pkg['upgrade'] = False
|
pkg['upgrade'] = False
|
||||||
|
|
||||||
upgradables = [x['pkg'] for x in upgrades if x['upgrade'] ]
|
for pkg in [x for x in upgrades if not x['upgrade']]:
|
||||||
if upgradables:
|
log.warning('Package require manual upgrade, no upgrades done: {} {} -> {}'.format(pkg['pkg'], pkg['version_old'], pkg['version_new']))
|
||||||
cmd = [ PKG_PATH, 'upgrade', '-yq' ] + upgradables
|
return False
|
||||||
|
|
||||||
|
cmd = [ PKG_PATH, 'upgrade', '-yq' ]
|
||||||
log.debug('Executing "{}"'.format(' '.join(cmd)))
|
log.debug('Executing "{}"'.format(' '.join(cmd)))
|
||||||
proc = subprocess.Popen(
|
proc = subprocess.Popen(
|
||||||
cmd,
|
cmd,
|
||||||
@ -170,8 +172,5 @@ def pkg_upgrade():
|
|||||||
for line in err.splitlines():
|
for line in err.splitlines():
|
||||||
log.warning('stderr: {}'.format(line))
|
log.warning('stderr: {}'.format(line))
|
||||||
|
|
||||||
for pkg in [x for x in upgrades if not x['upgrade']]:
|
|
||||||
log.warning('Package require manual upgrade: {} {} -> {}'.format(pkg['pkg'], pkg['version_old'], pkg['version_new']))
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user