fix handling of quotes in rpath wrapper#4722
Open
Flamefire wants to merge 9 commits intoeasybuilders:developfrom
Open
fix handling of quotes in rpath wrapper#4722Flamefire wants to merge 9 commits intoeasybuilders:developfrom
Flamefire wants to merge 9 commits intoeasybuilders:developfrom
Conversation
In some software the compiler must be invoked with an argument containing a literal single quote which requires escaping in the call. E.g.: `gcc -DFOO=\'value\'` However the current rpath wrapper would remove those single quotes causing errors during compilation or erronous behavior of the compiled binary. Fix by replacing the `eval` of the `rpath_args.py` output by `readarray -t`. An array asignment could be used (`CMD_ARGS=( $(rpath_args.py ...) )`) but that would break up arguments containing spaces. Quotes from the output are kept literally, so quoting to avoid this is not possible. `readarray -t` works and is widely available. Also some minor fixes related to quoting in the bash script template.
156b79d to
70ae337
Compare
70ae337 to
7981f47
Compare
45b6ee9 to
79e1831
Compare
Member
|
@Flamefire Failing tests should be looked into, and meanwhile merge conflicts have emerged as well |
Contributor
Author
|
Resolved the merge conflicts. Test failures were mostly due to I also switched the separator to NULL similar to |
92cdf89 to
eb1144e
Compare
Added in Python 3 and implies `-E -s`. So use that fulfilling the TODO.
Contributor
Author
|
Shall we add a special case to tests to detect the GitHub rate limit and skip/succeed them in PRs? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In some software the compiler must be invoked with an argument containing a literal single quote which requires escaping in the call. E.g.:
gcc -DFOO=\'value\'However the current rpath wrapper would remove those single quotes causing errors during compilation or erronous behavior of the compiled binary.
Fix by replacing the
evalof therpath_args.pyoutput byreadarray -t. An array asignment could be used (CMD_ARGS=( $(rpath_args.py ...) )) but that would break up arguments containing spaces. Quotes from the output are kept literally, so quoting to avoid this is not possible.readarray -tworks and is widely available.Also some minor fixes related to quoting in the bash script template.
Note: I used the NULL separator to separate arguments in the output as there is a (very small) chance an argument to the compiler contains newlines.