don't try to group requires/conflicts
We can't reliably get mappings between requires and conflicts, so just split the out to not confuse people. Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
f33bf0ddec
commit
99f6926156
1 changed files with 6 additions and 8 deletions
14
rust2rpm.py
14
rust2rpm.py
|
@ -1,5 +1,4 @@
|
||||||
import argparse
|
import argparse
|
||||||
import itertools
|
|
||||||
import os
|
import os
|
||||||
import tarfile
|
import tarfile
|
||||||
import tempfile
|
import tempfile
|
||||||
|
@ -28,11 +27,11 @@ ExclusiveArch: %{rust_arches}
|
||||||
|
|
||||||
BuildRequires: rust
|
BuildRequires: rust
|
||||||
BuildRequires: cargo
|
BuildRequires: cargo
|
||||||
{% for br, bc in zip(buildrequires, buildconflicts) %}
|
{% for br in buildrequires %}
|
||||||
BuildRequires: {{ br }}
|
BuildRequires: {{ br }}
|
||||||
{% if bc is not none %}
|
{% endfor %}
|
||||||
|
{% for bc in buildconflicts %}
|
||||||
BuildConflicts: {{ bc }}
|
BuildConflicts: {{ bc }}
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
@ -44,11 +43,11 @@ BuildArch: noarch
|
||||||
{% for prov in provides %}
|
{% for prov in provides %}
|
||||||
Provides: {{ prov }}
|
Provides: {{ prov }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for req, con in zip(requires, conflicts) %}
|
{% for req in requires %}
|
||||||
Requires: {{ req }}
|
Requires: {{ req }}
|
||||||
{% if con is not none %}
|
{% endfor %}
|
||||||
|
{% for con in conflicts %}
|
||||||
Conflicts: {{ con }}
|
Conflicts: {{ con }}
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
|
@ -72,7 +71,6 @@ Conflicts: {{ con }}
|
||||||
"""
|
"""
|
||||||
JINJA_ENV = jinja2.Environment(undefined=jinja2.StrictUndefined,
|
JINJA_ENV = jinja2.Environment(undefined=jinja2.StrictUndefined,
|
||||||
trim_blocks=True, lstrip_blocks=True)
|
trim_blocks=True, lstrip_blocks=True)
|
||||||
JINJA_ENV.globals.update(zip=itertools.zip_longest)
|
|
||||||
|
|
||||||
|
|
||||||
def run_depgen(*params):
|
def run_depgen(*params):
|
||||||
|
|
Loading…
Reference in a new issue