Add efficient method for detecting installed packages
Change the command used to verify if the epel package is installed from yum to rpm, way more faster. Closes-Bug: 1415629 Change-Id: I886ee2da0d6c33651290271e42e3ba762e555163 Signed-off-by: Francesco Vollero <fvollero@redhat.com>
This commit is contained in:
parent
39c978ecfe
commit
31566d6458
@ -58,8 +58,8 @@ class HadoopServer(object):
|
||||
|
||||
@saharautils.inject_remote('r')
|
||||
def rpms_installed(self, r):
|
||||
yum_cmd = 'yum -q list installed %s' % EPEL_RELEASE_PACKAGE_NAME
|
||||
ret_code, stdout = r.execute_command(yum_cmd,
|
||||
rpm_cmd = 'rpm -q %s' % EPEL_RELEASE_PACKAGE_NAME
|
||||
ret_code, stdout = r.execute_command(rpm_cmd,
|
||||
run_as_root=True,
|
||||
raise_when_error=False)
|
||||
return ret_code == 0
|
||||
|
Loading…
Reference in New Issue
Block a user