Remove unneeded "-a" from the RPM query for performance improvement (#3077)

Signed-off-by: Julian C. Dunn <jdunn@chef.io>
This commit is contained in:
Julian C. Dunn 2018-05-31 09:11:41 -07:00 committed by Clinton Wolfe
parent c244ce6319
commit 1046a77027
3 changed files with 4 additions and 4 deletions

View file

@ -181,7 +181,7 @@ module Inspec::Resources
def rpm_command(package_name)
cmd = ''
cmd += 'rpm -qia'
cmd += 'rpm -qi'
cmd += " --dbpath #{@dbpath}" if @dbpath
cmd += ' ' + package_name

View file

@ -240,9 +240,9 @@ class MockLoader
'yum -v repolist all' => cmd.call('yum-repolist-all'),
'dpkg -s curl' => cmd.call('dpkg-s-curl'),
'dpkg -s held-package' => cmd.call('dpkg-s-held-package'),
'rpm -qia curl' => cmd.call('rpm-qia-curl'),
'rpm -qia --dbpath /var/lib/fake_rpmdb curl' => cmd.call('rpm-qia-curl'),
'rpm -qia --dbpath /var/lib/rpmdb_does_not_exist curl' => cmd_exit_1.call,
'rpm -qi curl' => cmd.call('rpm-qi-curl'),
'rpm -qi --dbpath /var/lib/fake_rpmdb curl' => cmd.call('rpm-qi-curl'),
'rpm -qi --dbpath /var/lib/rpmdb_does_not_exist curl' => cmd_exit_1.call,
'pacman -Qi curl' => cmd.call('pacman-qi-curl'),
'brew info --json=v1 curl' => cmd.call('brew-info--json-v1-curl'),
'brew info --json=v1 nginx' => cmd.call('brew-info--json-v1-nginx'),