thinking makes me insane :(

This commit is contained in:
Fredrik Eriksson 2021-07-04 15:00:42 +02:00
parent 214ec6abad
commit ac1a0baf92
Signed by: feffe
GPG Key ID: F4329687B0FA7F8D
2 changed files with 6 additions and 6 deletions

View File

@ -112,11 +112,11 @@ def pkg_upgrade():
pkg['upgrade_level'] = sau.helpers.version_diff(pkg['version_new'], pkg['version_old']) pkg['upgrade_level'] = sau.helpers.version_diff(pkg['version_new'], pkg['version_old'])
log.info('pkg upgrade available {}'.format(pkg)) log.info('pkg upgrade available {}'.format(pkg))
sens = conf.getint('packages', pkg['pkg'], fallback=default_version_sens) sens = conf.getint('packages', pkg['pkg'], fallback=default_version_sens)
if sens >= pkg['upgrade_level']: if sens <= pkg['upgrade_level']:
log.debug('configured level {} >= pkg level {}'.format(sens, pkg['upgrade_level'])) log.debug('configured level {} <= pkg level {}'.format(sens, pkg['upgrade_level']))
pkg['upgrade'] = True pkg['upgrade'] = True
else: 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 pkg['upgrade'] = False
for pkg in [x for x in upgrades if not x['upgrade']]: for pkg in [x for x in upgrades if not x['upgrade']]:

View File

@ -136,10 +136,10 @@ def pkg_upgrade():
sens = conf.getint('packages', name, fallback=default_version_sens) sens = conf.getint('packages', name, fallback=default_version_sens)
common = sau.helpers.version_diff(new, old) common = sau.helpers.version_diff(new, old)
if sens >= common: if sens <= common:
log.info('{} -- {} -> {} configured level {} >= pkg level {}'.format(name, old, new, sens, common)) log.info('{} -- {} -> {} configured level {} <= pkg level {}'.format(name, old, new, sens, common))
else: else:
log.warning('{} -- {} -> {} configured level {} < pkg level {}'.format(name, old, new, sens, common)) log.warning('{} -- {} -> {} configured level {} > pkg level {}'.format(name, old, new, sens, common))
do_rebuild = False do_rebuild = False
if not do_rebuild: if not do_rebuild: