use rpm -q --whatprovides as a more general check

When dealing with versions use: -q
When dealing with names use: -q --whatprovides

Releated to http://projects.puppetlabs.com/issues/5831

Change-Id: I443da6ac74f821241405ba1e3d3e005edc8d29ff
Merge "use rpm -q --whatprovides as a more general check"