From 9ad77ecbe75af6715e0555c86f9f69d6020c64c6 Mon Sep 17 00:00:00 2001 From: Mikel Olasagasti Uranga Date: Nov 16 2023 18:17:17 +0000 Subject: Remove setting name in template In 71a215f the `--name` arg is added that sets the goname variable that is used by the tepmlate. With the changes in 8b6977d name is set in the template rather than using %goname rpm variable and the %goname setting is not removed. This commit restores previous for templating, without modifying the naming spec introduced in 8b6977d. --- diff --git a/go2rpm/__main__.py b/go2rpm/__main__.py index 3878d53..fedabec 100644 --- a/go2rpm/__main__.py +++ b/go2rpm/__main__.py @@ -718,7 +718,6 @@ def main(): kwargs["generator_version"] = __version__ kwargs["goipath"] = goipath kwargs["goname"] = args.name - kwargs["name"] = name kwargs["forge"] = forge kwargs["subdir"] = subdir kwargs["altipaths"] = args.altipaths diff --git a/go2rpm/templates/profile1.spec b/go2rpm/templates/profile1.spec index 7d6c615..249fbca 100644 --- a/go2rpm/templates/profile1.spec +++ b/go2rpm/templates/profile1.spec @@ -31,7 +31,7 @@ Version: {{ tag }} %global common_description %{expand: {{ description|default("# FIXME", true)|wordwrap(wrapstring="\\\n")|trim }}} -Name: {{ name }} +Name: %{goname} {% if version is none and tag is none %} Version: 0 {% endif %} diff --git a/go2rpm/templates/profile2.spec b/go2rpm/templates/profile2.spec index 1dce456..6b69ae4 100644 --- a/go2rpm/templates/profile2.spec +++ b/go2rpm/templates/profile2.spec @@ -56,7 +56,7 @@ Version: {{ tag }} %global godocs {{ doc_files|join(' ')|wordwrap(width=53, wrapstring="\\\\\\\n ")|trim }} {% endif %} -Name: {{ name }} +Name: %{goname} {% if version is none and tag is none %} Version: 0 {% endif %}