def local_nvra(module, path):
 ts = rpm.TransactionSet()
 ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
 fd = os.open(path, os.O_RDONLY)
 try:
  header = ts.hdrFromFdno(fd)
 finally:
  os.close(fd)
 return ('%s-%s-%s.%s' % (header[rpm.RPMTAG_NAME], header[rpm.RPMTAG_VERSION], header[rpm.RPMTAG_RELEASE], header[rpm.RPMTAG_ARCH]))

def local_nvra ( module , path ) : ts = rpm . TransactionSet ( ) ts . setVSFlags ( rpm . _RPMVSF_NOSIGNATURES ) fd = os . open ( path , os . O_RDONLY ) try : header = ts . hdrFromFdno ( fd ) finally : os . close ( fd ) return ( '%s-%s-%s.%s' % ( header [ rpm . RPMTAG_NAME ] , header [ rpm . RPMTAG_VERSION ] , header [ rpm . RPMTAG_RELEASE ] , header [ rpm . RPMTAG_ARCH ] ) )
return nvra of a local rpm passed in .