hopefully fixed logic error...
This commit is contained in:
parent
5a20f43255
commit
f5adcbc140
@ -112,11 +112,11 @@ def pkg_upgrade():
|
||||
pkg['upgrade_level'] = sau.helpers.version_diff(pkg['version_new'], pkg['version_old'])
|
||||
log.info('pkg upgrade available {}'.format(pkg))
|
||||
sens = conf.getint('packages', pkg['pkg'], fallback=default_version_sens)
|
||||
if sens <= pkg['upgrade_level']:
|
||||
log.debug('configured level {} <= pkg level {}'.format(sens, pkg['upgrade_level']))
|
||||
if sens >= pkg['upgrade_level']:
|
||||
log.debug('configured level {} >= pkg level {}'.format(sens, pkg['upgrade_level']))
|
||||
pkg['upgrade'] = True
|
||||
else:
|
||||
log.debug('configured level {} > pkg level {}'.format(sens, pkg['upgrade_level']))
|
||||
log.debug('configured level {} < pkg level {}'.format(sens, pkg['upgrade_level']))
|
||||
pkg['upgrade'] = False
|
||||
|
||||
for pkg in [x for x in upgrades if not x['upgrade']]:
|
||||
|
@ -141,10 +141,10 @@ def pkg_upgrade():
|
||||
|
||||
sens = conf.getint('packages', name, fallback=default_version_sens)
|
||||
common = sau.helpers.version_diff(version, old)
|
||||
if sens <= common:
|
||||
log.info('{}-{} -> {} configured level {} <= pkg level {}'.format(name, old, version, sens, common))
|
||||
if sens >= common:
|
||||
log.info('{} -- {} -> {} configured level {} >= pkg level {}'.format(name, old, version, sens, common))
|
||||
else:
|
||||
log.warning('{}-{} -> {} configured level {} > pkg level {}'.format(name, old, version, sens, common))
|
||||
log.warning('{} -- {} -> {} configured level {} < pkg level {}'.format(name, old, version, sens, common))
|
||||
do_rebuild = False
|
||||
|
||||
if not do_rebuild:
|
||||
|
Loading…
Reference in New Issue
Block a user