Skip to content

Instantly share code, notes, and snippets.

@alces
Created December 31, 2019 14:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save alces/5c8ba859480a07e69e806e1fabb61f16 to your computer and use it in GitHub Desktop.
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