Created
December 31, 2019 14:00
-
-
Save alces/5c8ba859480a07e69e806e1fabb61f16 to your computer and use it in GitHub Desktop.
Print Java RPM version (tested on RedHat 7)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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