[Rpm-maint] [rpm-software-management/rpm] --eval doesn't expand %if's (#472)

Igor Gnatenko notifications at github.com
Fri Jul 20 08:23:43 UTC 2018


```
%cargo_prep (\
set -eu \
%{__mkdir} -p .cargo \
cat > .cargo/config << EOF \
[build]\
rustc = "%{__rustc}"\
rustdoc = "%{__rustdoc}"\
rustflags = %{__global_rustflags_toml}\
\
[term]\
verbose = true\
\
[source]\
\
[source.local-registry]\
directory = "%{cargo_registry}"\
\
[source.crates-io]\
registry = "https://crates.io"\
replace-with = "local-registry"\
EOF\
%{__rm} -f Cargo.lock \
%if ! %{with check} \
# https://github.com/rust-lang/cargo/issues/3732 \
%{__awk} -i inplace -v INPLACE_SUFFIX=.orig '/^\\\[dev-dependencies/{f=1;next} /^\\\[/{f=0}; !f' Cargo.toml \
%endif \
)
```

I have this definition of macros.

However if I do `rpm --eval "%cargo_prep"` it leaves `%if` there.

```
⋊> ~/P/u/rpm on master ⨯ rpm --eval "%cargo_prep" | grep "^%"                                                                                                                                              10:23:28
%if ! 0 
%endif 
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/472
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20180720/eb0cee8d/attachment.html>


More information about the Rpm-maint mailing list