Description of problem: + gawk -i inplace -v INPLACE_SUFFIX=.deps '/^\[((.+\.)?((dev|build)-)?dependencies|features)/{f=1;next} /^\[/{f=0}; !f' Cargo.toml + /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 /usr/bin/cargo package -l + xargs -d '\n' /usr/bin/cp --parents -a -t /builddir/build/BUILDROOT/rust-nom-4.2.3-3.fc31.x86_64/usr/share/cargo/registry/nom-4.2.3 BUILDSTDERR: warning: No (git) VCS found for `/builddir/build/BUILD/nom-4.2.3` + /usr/bin/mv Cargo.toml.deps Cargo.toml BUILDSTDERR: /usr/bin/mv: cannot stat 'Cargo.toml.deps': No such file or directory Version-Release number of selected component (if applicable): 5.0.1-1.fc31 How reproducible: Always. Steps to Reproduce: 1. Build rust-nom package Actual results: gawk does not create file with INPLACE_SUFFIX. Expected results: gawk creates file with INPLACE_SUFFIX. Additional info:
This is due to https://git.savannah.gnu.org/cgit/gawk.git/commit/?id=663aff4ae012468c54d2e994e839d0e75210ef80 and it is present only in 5.x... So how should I handle this if I want to support both gawks?
Obviously I can't do this: + gawk -i inplace -v inplace::suffix=.deps -v INPLACE_SUFFIX=.deps '/^\[((.+\.)?((dev|build)-)?dependencies|features)/{f=1;next} /^\[/{f=0}; !f' Cargo.toml gawk: fatal: `inplace::suffix' is not a legal variable name
https://lists.gnu.org/archive/html/bug-gawk/2019-06/msg00039.html
(In reply to Igor Gnatenko from comment #2) > Obviously I can't do this: > > + gawk -i inplace -v inplace::suffix=.deps -v INPLACE_SUFFIX=.deps > '/^\[((.+\.)?((dev|build)-)?dependencies|features)/{f=1;next} /^\[/{f=0}; > !f' Cargo.toml > gawk: fatal: `inplace::suffix' is not a legal variable name This bug is fixed now in sources at git://git.savannah.gnu.org/gawk and INPLACE_SUFFIX if accepted too as a backcompatibility change. OTOH if you do not want to rely on something not released yet you can check gawk version and proceed accordingly. Something like that: suffix=$(gawk -V | gawk '/^GNU Awk /{print ($3 >= 5 ? "inplace::suffix" : "INPLACE_SUFFIX"); exit}') and use $suffix in the subsequent gawk call.
I think it should be fixed in gawk-5.0.1-2, which has incorporated those patches.
(In reply to Andrew Schorr from comment #5) > I think it should be fixed in gawk-5.0.1-2, which has incorporated those > patches. Yes, I've added the patches dealing with this to the Fedora. You should now be able to use both the the namespaced and non-namespaced versions of INPLACE_SUFFIX