def state(args = {})
      return :available if koji_state(args) == :available

      state = distgit_state(args)
      return :needs_repo   if state == :missing_repo
      return :needs_branch if state == :missing_branch
      return :needs_spec   if state == :missing_spec
      return :needs_build  if state == :available
      return :needs_update
    end
def state(args = {})
      return :available if koji_state(args) == :available

      state = distgit_state(args)
      return :needs_repo   if state == :missing_repo
      return :needs_branch if state == :missing_branch
      return :needs_spec   if state == :missing_spec
      return :needs_build  if state == :available
      return :needs_update
    end
Return the 'state' of the gem as inferred by
 the targets which there are versions for.

 If optional :check argument is specified, version
 analysis will be restricted to targets satisfying
 the specified gem dependency requirements