From ef18f9d9534f5b8c260cf6862e2745f053b6517d Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 9 Aug 2012 21:35:21 -0400 Subject: [PATCH] Fix a scoping issue that was fixing some non-repoquery-installed cases --- library/yum | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/yum b/library/yum index 77268c18c8..3c139c842f 100755 --- a/library/yum +++ b/library/yum @@ -141,8 +141,8 @@ def run(command): def install_no_repoq(module, items, yum_basecmd, latest=False): res = {'changed': False} + to_install = [] if not latest: - to_install = [] for item in items: rc, out, err = run([rpmbin, "-q", "--whatprovides", item]) if rc != 0: @@ -150,7 +150,8 @@ def install_no_repoq(module, items, yum_basecmd, latest=False): if len(to_install) > 0: res['changed'] = True else: - rc, out, err = run(yum_basecmd + ["check-update"] + items) + cmd = yum_basecmd + ["check-update"] + items + rc, out, err = run(cmd) if rc == 100: res['changed'] = True to_install = items