Blame 0001-name-spec-patch_file-by-real-crate-name.patch

0cf7c3e
From 0dc9fc182edf0791ca697f587e48dd39948d63c1 Mon Sep 17 00:00:00 2001
0cf7c3e
From: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
0cf7c3e
Date: Mon, 10 Sep 2018 23:37:40 +0200
ae59ba4
Subject: [PATCH 01/10] name spec/patch_file by real crate name
0cf7c3e
0cf7c3e
When renaming using patch file, we really want to change file names too.
0cf7c3e
0cf7c3e
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
0cf7c3e
---
0cf7c3e
 rust2rpm/__main__.py | 4 ++--
0cf7c3e
 1 file changed, 2 insertions(+), 2 deletions(-)
0cf7c3e
0cf7c3e
diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py
0cf7c3e
index dc78828..1575ce6 100644
0cf7c3e
--- a/rust2rpm/__main__.py
0cf7c3e
+++ b/rust2rpm/__main__.py
0cf7c3e
@@ -218,7 +218,7 @@ def main():
0cf7c3e
     template = JINJA_ENV.get_template("main.spec")
0cf7c3e
 
0cf7c3e
     if args.patch and len(diff) > 0:
0cf7c3e
-        patch_file = "{}-fix-metadata.diff".format(crate)
0cf7c3e
+        patch_file = "{}-fix-metadata.diff".format(metadata.name)
0cf7c3e
     else:
0cf7c3e
         patch_file = None
0cf7c3e
 
0cf7c3e
@@ -269,7 +269,7 @@ def main():
0cf7c3e
         kwargs["license"] = license
0cf7c3e
         kwargs["license_comments"] = comments
0cf7c3e
 
0cf7c3e
-    spec_file = "rust-{}.spec".format(crate)
0cf7c3e
+    spec_file = "rust-{}.spec".format(metadata.name)
0cf7c3e
     spec_contents = template.render(md=metadata, patch_file=patch_file, **kwargs)
0cf7c3e
     if args.stdout:
0cf7c3e
         print("# {}".format(spec_file))
0cf7c3e
-- 
0cf7c3e
2.19.1
0cf7c3e