From ac1a0baf92b61d0a907876f8b9d229c9eb35deea Mon Sep 17 00:00:00 2001 From: Fredrik Eriksson Date: Sun, 4 Jul 2021 15:00:42 +0200 Subject: [PATCH] thinking makes me insane :( --- sau/freebsd.py | 6 +++--- sau/gentoo.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sau/freebsd.py b/sau/freebsd.py index cc597ef..11530cc 100644 --- a/sau/freebsd.py +++ b/sau/freebsd.py @@ -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']]: diff --git a/sau/gentoo.py b/sau/gentoo.py index 22913d2..4c1f08f 100644 --- a/sau/gentoo.py +++ b/sau/gentoo.py @@ -136,10 +136,10 @@ def pkg_upgrade(): sens = conf.getint('packages', name, fallback=default_version_sens) common = sau.helpers.version_diff(new, old) - if sens >= common: - log.info('{} -- {} -> {} configured level {} >= pkg level {}'.format(name, old, new, sens, common)) + if sens <= common: + log.info('{} -- {} -> {} configured level {} <= pkg level {}'.format(name, old, new, sens, common)) 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 if not do_rebuild: