Resolve idempotency issue with virtual apt package (#3449)

Virtual packages were always marked as upgradable which caused the changed-state even though nothing changed.
pull/18777/head
NielsH 9 years ago committed by Matt Clay
parent fb5a91d9d1
commit 1b94aa2d43

@ -269,7 +269,7 @@ def package_status(m, pkgname, version, cache, state):
installed, upgradable, has_files = package_status(m, package.name, version, cache, state='install') installed, upgradable, has_files = package_status(m, package.name, version, cache, state='install')
if installed: if installed:
is_installed = True is_installed = True
return is_installed, True, False return is_installed, upgradable, False
m.fail_json(msg="No package matching '%s' is available" % pkgname) m.fail_json(msg="No package matching '%s' is available" % pkgname)
except AttributeError: except AttributeError:
# python-apt version too old to detect virtual packages # python-apt version too old to detect virtual packages

Loading…
Cancel
Save