Repository navigation
fish: avoid replacing "awk" in store paths - #557806
Conversation
We encountered a fish build failure [1] caused by the store path for gnugrep coincidentally containing the string `awk`. A later substitution of `awk` replaced this substring with another store path in some files, resulting in a number of broken paths. Extending the `awk` pattern to `awk ` solves this problem and should be relatively safe given that awk requires arguments to be passed. [1] https://hydra.nixos.org/build/343861659
|
getent has a full /usr path. Could the awk replacement do similar. |
|
Not sure how that would work. The relevant files invoke awk from |
|
You could also reorder the substitutions to do the awk replacement before grep, and that would achieve the same as 'awk '. I've never looked at these substitutions before, but they actually have some bad side effects. For example this substitution completely breaks completion for awk itself. I don't think there is a good substitution for awk. We should either wrap fish, or let it fail for people who don't have awk installed. I'm not quite sure what the behavior for the latter is, but I suspect it's not pretty. There's also some stale and unnecessary substitutions. e.g. the getent replacement doesn't actually do anything. I'm ok with merging this for now to unbreak fish. I'll be working on a more comprehensive update though. |
|
Sounds good. Yeah, this was only meant as a stopgap to unbreak fish on |
|
Successfully created backport PR for |
We're encountering a fish build failure on
staging-next-26.05caused by the store path for gnugrep coincidentally containing the stringawk. A later substitution ofawkreplaces this substring with another store path in some files, resulting in a number of broken paths that look like this:Extending the
awkpattern toawksolves this problem and should be relatively safe given that awk requires arguments to be passed. (Let me know if you have a better idea to match awk invocations!)Planning to get this into
masterfirst, then cherry-pick tostaging-next-26.05, where the build failure happens.Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.