sort dependencies by name

If we want readable and reproducible results, we should sort our
dependency list.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2017-02-11 19:04:30 +01:00
parent 593a5aaf4d
commit baceedccbd

View file

@ -33,18 +33,18 @@ ExclusiveArch: %{rust_arches}
BuildRequires: rust BuildRequires: rust
BuildRequires: cargo BuildRequires: cargo
{% for req in md.build_requires %} {% for req in md.build_requires|sort(attribute="name") %}
BuildRequires: {{ req }} BuildRequires: {{ req }}
{% endfor %} {% endfor %}
{% for con in md.build_conflicts %} {% for con in md.build_conflicts|sort(attribute="name") %}
BuildConflicts: {{ con }} BuildConflicts: {{ con }}
{% endfor %} {% endfor %}
{% if md.test_requires|length > 0 %} {% if md.test_requires|length > 0 %}
%if %{with check} %if %{with check}
{% for req in md.test_requires %} {% for req in md.test_requires|sort(attribute="name") %}
BuildRequires: {{ req }} BuildRequires: {{ req }}
{% endfor %} {% endfor %}
{% for con in md.test_conflicts %} {% for con in md.test_conflicts|sort(attribute="name") %}
BuildConflicts: {{ con }} BuildConflicts: {{ con }}
{% endfor %} {% endfor %}
%endif %endif
@ -60,10 +60,10 @@ BuildArch: noarch
{% for prv in md.provides %} {% for prv in md.provides %}
Provides: {{ prv }} Provides: {{ prv }}
{% endfor %} {% endfor %}
{% for req in md.requires %} {% for req in md.requires|sort(attribute="name") %}
Requires: {{ req }} Requires: {{ req }}
{% endfor %} {% endfor %}
{% for con in md.conflicts %} {% for con in md.conflicts|sort(attribute="name") %}
Conflicts: {{ con }} Conflicts: {{ con }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}