simple optimization for the extremely common case
This commit is contained in:
parent
cc086458e1
commit
e9c042bab7
1 changed files with 7 additions and 0 deletions
|
@ -409,6 +409,13 @@ def install(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos):
|
||||||
|
|
||||||
# range requires or file-requires or pkgname :(
|
# range requires or file-requires or pkgname :(
|
||||||
else:
|
else:
|
||||||
|
# most common case is the pkg is already installed and done
|
||||||
|
# short circuit all the bs - and search for it as a pkg in is_installed
|
||||||
|
# if you find it then we're done
|
||||||
|
if is_installed(module, repoq, spec, conf_file, en_repos=en_repos, dis_repos=dis_repos, is_pkg=True):
|
||||||
|
res['results'].append('%s providing %s is already installed' % (this, spec))
|
||||||
|
continue
|
||||||
|
|
||||||
# look up what pkgs provide this
|
# look up what pkgs provide this
|
||||||
pkglist = what_provides(module, repoq, spec, conf_file, en_repos=en_repos, dis_repos=dis_repos)
|
pkglist = what_provides(module, repoq, spec, conf_file, en_repos=en_repos, dis_repos=dis_repos)
|
||||||
if not pkglist:
|
if not pkglist:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue