This refactors the %cargo_prep macro to support vendoring.
Note, the
%{__rm} -f Cargo.lock\ %{__rm} -f Cargo.toml.orig\
part does not run when vendoring is enabled to mirror rust-toolset's version. I'm not sure if that's correct.
Thanks! I really appreciate your help with this.
I think it's OK that Cargo.lock isn't removed when using vendored sources.
Cargo.lock
The reason why we're removing Cargo.lock.orig is because it interferes with running %cargo_install for library crates, but for library crates, using vendored sources makes no sense anyway. But to prevent weird error messages, it might be good to also remove Cargo.toml.orig unconditionally.
Cargo.lock.orig
%cargo_install
Cargo.toml.orig
Sure!
But to prevent weird error messages, it might be good to also remove Cargo.toml.orig unconditionally.
I could easily move it up a few lines (i.e. outside of the conditional expansion). Just let me know.
Yes please 😄
Sorry, did you want both files unconditionally removed or only remove Cargo.toml.orig unconditionally?
Sorry for the ambiguity, I'm tired :zzz:
Removing Cargo.toml.orig unconditonally is good, but Cargo.lock should only be removed when not using vendored sources, I think.
1 new commit added
cargo_prep: remove Cargo.toml.orig unconditionally
Done!
2 new commits added
%cargo_prep: remove Cargo.toml.orig unconditionally
%cargo_prep: add -v and -N flags to support vendoring
Thank you! Looks good to me. I'll merge and test, then work on tagging a new release.
Pull-Request has been merged by decathorpe
This refactors the %cargo_prep macro to support vendoring.
Note, the
part does not run when vendoring is enabled to mirror rust-toolset's version. I'm not sure if that's correct.