code: def check_sig(package):
      
      rpmroot = '/'
  
      ts = rpm.TransactionSet(rpmroot)
  
      sigerror = 0
      ts.setVSFlags(0)
      hdr = return_hdr(ts, package)
      sigerror, (sigtype, sigdate, sigid) = get_sig_info(hdr)
      if sigid == 'None':
          keyid = 'None'
      else:
          keyid = sigid[-8:]
      if keyid != 'None':
          return True
      else:
          return False
docs: check if rpm has a signature, we don't care if it's valid or not
      at the moment
  
      Shamelessly stolen from Seth Vidal
      http://yum.baseurl.org/download/misc/checksig.py