{% macro describe_failure(build) %}
{% if build.fail_type %}
  <dt>Build State:</dt>
  <dd><span class="build-failed pficon pficon-error-circle-o"></span> failed</dd>

  <dt>State Description:</dt>
  <dd>
  {% if build.fail_type_text == "unknown_error" %}
    Unknown error.

  {% elif build.fail_type_text == "build_error" %}
    Build error. See logs of individual chroots for more information.

  {% elif build.fail_type_text == "srpm_import_failed" %}
    Importing SRPM into Dist Git failed.

  {% elif build.fail_type_text == "srpm_download_failed" %}
    Could not download the SRPM. Probably bad URL.

  {% elif build.fail_type_text == "srpm_query_failed" %}
    RPM query failed. The file is probably not a SRPM.

  {% elif build.fail_type_text == "import_timeout_exceeded" %}
    Importing into Dist Git failed due to exceeded timeout

  {# Git section #}
  {% elif build.fail_type_text == "git_clone_failed" %}
    Git clone failed.

  {% elif build.fail_type_text == "git_wrong_directory" %}
    Wrong directory in git.

  {% elif build.fail_type_text == "git_checkout_error" %}
    Git checkout failed.

  {% elif build.fail_type_text == "srpm_build_error" %}
    Attempt to build SRPM have failed.

  {% endif %}
  </dd>
{% endif %}
{% endmacro %}
