diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py index ac3f1c4..e08efc5 100644 --- a/rust2rpm/__main__.py +++ b/rust2rpm/__main__.py @@ -246,10 +246,11 @@ def make_patches(args, toml): toml_before = open(toml).readlines() diff1 = diff2 = None + toml_path = f"{args.crate}-{args.version}/Cargo.toml" # We always do the automatic part before asking the user for more edits. if toml_after := args.patch_foreign and drop_foreign_dependencies(toml_before): - diff1 = make_diff(toml, + diff1 = make_diff(toml_path, toml_before, mtime_before, toml_after, mtime_before) else: @@ -267,7 +268,7 @@ def make_patches(args, toml): mtime_after2 = file_mtime(tmpfile.name) toml_after2 = open(tmpfile.name).readlines() - diff2 = make_diff(toml, + diff2 = make_diff(toml_path, toml_after, mtime_before, toml_after2, mtime_after2) @@ -508,8 +509,8 @@ def main(): pkg_name = package_name_suffixed(metadata.name, args.suffix) - patch_files = (f"{metadata.name}-automatic.diff" if diffs[0] else None, - f"{metadata.name}-manual.diff" if diffs[1] else None) + patch_files = (f"{metadata.name}-fix-metadata-auto.diff" if diffs[0] else None, + f"{metadata.name}-fix-metadata.diff" if diffs[1] else None) spec_file = pathlib.Path(f"{pkg_name}.spec")