Skip to content

Instantly share code, notes, and snippets.

@gm3dmo
Last active August 29, 2015 14:23
Show Gist options
  • Save gm3dmo/dc4c35b5df596bf329e8 to your computer and use it in GitHub Desktop.
Save gm3dmo/dc4c35b5df596bf329e8 to your computer and use it in GitHub Desktop.
#!/bin/env python
import sys
import yum
from rpmUtils.miscutils import *
def get_rpm_name_components(package):
"""
"""
x = splitFilename(package)
return x
def get_rpm_header(package):
ts=''
x = rpmUtils.miscutils.hdrFromPackage(ts,package)
return x
def main():
try:
package = sys.argv[1]
except:
package = 'bc-1.06.95-1.el6.x86_64'
print(get_rpm_name_components(package))
#print(get_rpm_header(package))
if __name__ == '__main__':
sys.exit(main())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment