Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Print Java RPM version (tested on RedHat 7)
import rpm
for pkg in rpm.TransactionSet().dbMatch('provides', 'java'):
print '%s:%s:%s:%s' % (pkg['name'], pkg['version'], pkg['release'], pkg['epoch'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment