Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tokenization of option strings #253

Merged
merged 1 commit into from
Jul 13, 2023
Merged

Conversation

nforro
Copy link
Member

@nforro nforro commented Jul 13, 2023

Adjust the tokenization algorithm to take into account quotes contained within macro expansions and other expressions.

Notes for reviewers:

The tokenization works as before, but the option string is first parsed into nodes and everything that's not a string literal is treated as a single token.

RELEASE NOTES BEGIN

Fixed a bug in processing options of %prep macros. For instance, when a quoted string appeared inside an expression expansion, it could lead to improper parsing, rendering the spec file invalid after accessing the options.

RELEASE NOTES END

Adjust the tokenization algorithm to take into account quotes
contained within macro expansions and other expressions.

Signed-off-by: Nikola Forró <nforro@redhat.com>
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://softwarefactory-project.io/zuul/t/packit-service/buildset/9b09b9516cae41b1a69e85f051125227

✔️ pre-commit SUCCESS in 1m 27s
✔️ specfile-tests-rpm-deps SUCCESS in 1m 11s
✔️ specfile-tests-pip-deps SUCCESS in 1m 13s

Copy link
Member

@lbarcziova lbarcziova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

@nforro nforro added the mergeit Zuul, merge it! label Jul 13, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).
https://softwarefactory-project.io/zuul/t/packit-service/buildset/7e7588fa8b6248b081974567552b124c

✔️ pre-commit SUCCESS in 1m 28s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 2bdcec3 into main Jul 13, 2023
@delete-merged-branch delete-merged-branch bot deleted the options branch July 13, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit Zuul, merge it!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants