From 94dcd7b71e628d3ba126befe16ee4363c373dad9 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Dec 26 2020 11:49:15 +0000 Subject: rust2rpm: Return back printing BuildRequires in %generate_buildrequires This reverts commit 8e103f6aafef0bc1fd2470c8b3268ca6ee1975c9 (partially). Signed-off-by: Igor Raits --- diff --git a/rust2rpm/templates/main.spec b/rust2rpm/templates/main.spec index 71d1ffe..4848538 100644 --- a/rust2rpm/templates/main.spec +++ b/rust2rpm/templates/main.spec @@ -50,9 +50,6 @@ BuildArch: noarch {% endif %} BuildRequires: rust-packaging -{% for req in to_list(distconf.get("buildrequires"))|sort %} -BuildRequires: {{ req }} -{% endfor %} {% if all_features %} {% set cargo_args = " -a" %} {% endif %} @@ -77,6 +74,9 @@ BuildRequires: {{ req }} {% endfor %} %endif {% endif %} + {% for req in to_list(distconf.get("buildrequires"))|sort %} +BuildRequires: {{ req }} + {% endfor %} {% if has_buildrequires and not only_main %} %endif {% endif %} @@ -192,6 +192,9 @@ which use {% if feature is not none %}"{{ feature }}" feature of {% endif %}"%{c {% if generate_buildrequires %} %generate_buildrequires %cargo_generate_buildrequires{{ cargo_args }} + {% for req in to_list(distconf.get("buildrequires"))|sort %} +echo {{ "%r" | format(req) }} + {% endfor %} {% endif -%}