1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

if user has manually installed an intermediate version - don't ignore it: issue 1754

This commit is contained in:
Seth Vidal 2012-12-12 11:51:24 -05:00
parent 2fd7d7149f
commit 165861dd2f

View file

@ -396,6 +396,16 @@ def install(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos):
res['results'].append('%s providing %s is already installed' % (this, spec)) res['results'].append('%s providing %s is already installed' % (this, spec))
break break
# if the version of the pkg you have installed is not in ANY repo, but there are
# other versions in the repos (both higher and lower) then the previous checks won't work.
# so we check one more time. This really only works for pkgname - not for file provides or virt provides
# but virt provides should be all caught in what_provides on its own.
# highly irritating
if not found:
if is_installed(module, repoq, spec, conf_file, en_repos=en_repos, dis_repos=dis_repos):
found = True
res['results'].append('package providing %s is already installed' % (spec))
if found: if found:
continue continue
# if not - then pass in the spec as what to install # if not - then pass in the spec as what to install