crate: ensure metadata is re-loaded after patching Cargo.toml

This commit is contained in:
Fabio Valentini 2023-02-15 19:35:35 +01:00
parent 2e188b55a4
commit 334f043031
No known key found for this signature in database
GPG key ID: 5AC5F572E5D410AF

View file

@ -175,6 +175,9 @@ def process_project_local(
features = package.get_feature_names()
diffs = make_patches(name, package.version, patch, patch_foreign, toml_path, features)
# ensure metadata is up-to-date with changes from patches
metadata = Metadata.from_cargo(toml_path)
return name, diffs, metadata, doc_files, license_files
@ -222,6 +225,9 @@ def process_project(
features = package.get_feature_names()
diffs = make_patches(name, version, patch, patch_foreign, toml_path, features)
# ensure metadata is up-to-date with changes from patches
metadata = Metadata.from_cargo(toml_path)
if store_crate:
copy_target = os.path.join(os.getcwd(), f"{package.name}-{package.version}.crate")