Fix up Cargo.toml.orig error message that started to appear with Rust 1.43.0

+ /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 /opt/rust/bin/cargo package -l
+ grep -w -v Cargo.lock
+ xargs -d '\n' /bin/cp --parents -a -t /user/rpmbuild/BUILDROOT/rust-term_size-0.3.0-1.i2n.x86_64/datastore/dev/rust/cargo/registry/term_size-0.3.0
warning: No (git) VCS found for `/datastore/rpmbuild/BUILD/term_size-0.3.0`
/bin/cp: cannot stat 'Cargo.toml.orig': No such file or directory

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Thomas Jarosch 2020-05-02 19:12:29 +02:00 committed by Igor Raits
parent aa8f8a1f10
commit 90d0e85da2
No known key found for this signature in database
GPG key ID: 695714BD1BBC5F4C

View file

@ -90,10 +90,10 @@ if %__cargo_is_lib; then \
# so that cargo doesn't fail resolving dependencies: \ # so that cargo doesn't fail resolving dependencies: \
# https://github.com/rust-lang/cargo/pull/6729 \ # https://github.com/rust-lang/cargo/pull/6729 \
%{__awk} -i inplace -v INPLACE_SUFFIX=.deps '/^\\\[((.+\\\.)?((dev|build)-)?dependencies|features)/{f=1;next} /^\\\[/{f=0}; !f' Cargo.toml \ %{__awk} -i inplace -v INPLACE_SUFFIX=.deps '/^\\\[((.+\\\.)?((dev|build)-)?dependencies|features)/{f=1;next} /^\\\[/{f=0}; !f' Cargo.toml \
%{__cargo} package -l | grep -w -v Cargo.lock | xargs -d '\\\n' %{__cp} --parents -a -t $REG_DIR \ %{__cargo} package -l | grep -w -E -v 'Cargo.(lock|toml.orig)' | xargs -d '\\\n' %{__cp} --parents -a -t $REG_DIR \
%{__mv} Cargo.toml{.deps,} \ %{__mv} Cargo.toml{.deps,} \
%{__cp} -a Cargo.toml $REG_DIR/Cargo.toml \ %{__cp} -a Cargo.toml $REG_DIR/Cargo.toml \
%{__rm} -f $REG_DIR/Cargo.toml.{orig,deps} \ %{__rm} -f $REG_DIR/Cargo.toml.deps \
echo '{"files":{},"package":""}' > $REG_DIR/.cargo-checksum.json \ echo '{"files":{},"package":""}' > $REG_DIR/.cargo-checksum.json \
fi \ fi \
%if ! %__cargo_skip_build \ %if ! %__cargo_skip_build \