From baceedccbd33269ea14cb8ae0a63b7d315b98ae5 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 11 Feb 2017 19:04:30 +0100 Subject: [PATCH] sort dependencies by name If we want readable and reproducible results, we should sort our dependency list. Signed-off-by: Igor Gnatenko --- rust2rpm.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rust2rpm.py b/rust2rpm.py index 60f1f75..a76ae80 100644 --- a/rust2rpm.py +++ b/rust2rpm.py @@ -33,18 +33,18 @@ ExclusiveArch: %{rust_arches} BuildRequires: rust BuildRequires: cargo -{% for req in md.build_requires %} +{% for req in md.build_requires|sort(attribute="name") %} BuildRequires: {{ req }} {% endfor %} -{% for con in md.build_conflicts %} +{% for con in md.build_conflicts|sort(attribute="name") %} BuildConflicts: {{ con }} {% endfor %} {% if md.test_requires|length > 0 %} %if %{with check} -{% for req in md.test_requires %} +{% for req in md.test_requires|sort(attribute="name") %} BuildRequires: {{ req }} {% endfor %} -{% for con in md.test_conflicts %} +{% for con in md.test_conflicts|sort(attribute="name") %} BuildConflicts: {{ con }} {% endfor %} %endif @@ -60,10 +60,10 @@ BuildArch: noarch {% for prv in md.provides %} Provides: {{ prv }} {% endfor %} -{% for req in md.requires %} +{% for req in md.requires|sort(attribute="name") %} Requires: {{ req }} {% endfor %} -{% for con in md.conflicts %} +{% for con in md.conflicts|sort(attribute="name") %} Conflicts: {{ con }} {% endfor %} {% endif %}