Bug 1723359
| Summary: | Major update of gawk (5.x) breaks INPLACE_SUFFIX file creation | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Igor Raits <igor.raits> |
| Component: | gawk | Assignee: | Jakub Martisko <jamartis> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | urgent | Docs Contact: | |
| Priority: | high | ||
| Version: | rawhide | CC: | ajschorr, bcotton, deekej, fpokorny, jamartis, michal.jnn, m, ovasik, yaneti |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-08-05 13:03:01 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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
(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 |
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: