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

Non parametric macro inconsistency #2932

Closed
mlschroe opened this issue Feb 27, 2024 · 3 comments · Fixed by #2940
Closed

Non parametric macro inconsistency #2932

mlschroe opened this issue Feb 27, 2024 · 3 comments · Fixed by #2940

Comments

@mlschroe
Copy link
Contributor

I stumbled over this:

$ rpm --eval '%{?_libdir:foo}'
foo
$ rpm --eval '%{_libdir:foo}'
/usr/lib64

Should those two both return foo?

@mlschroe
Copy link
Contributor Author

There are good reasons to leave it the way it is, I just wanted to point out that there's a somewhat undocumented difference.

@pmatilai
Copy link
Member

pmatilai commented Feb 27, 2024

Why should the latter return anything else than an error (or at least issue a warning)?
It's passing arguments to a non-parametric macro so it seems only right to ignore the argument and return the macro value instead.

@mlschroe
Copy link
Contributor Author

True. I'm fine with leaving it the way it is.

pmatilai added a commit to pmatilai/rpm that referenced this issue Mar 6, 2024
This should be an error for consistency with other macro argument
checking but as there appear to be usages in the wild, make it a
warning for now.

Fixes: rpm-software-management#2932
ffesti pushed a commit that referenced this issue Mar 14, 2024
This should be an error for consistency with other macro argument
checking but as there appear to be usages in the wild, make it a
warning for now.

Fixes: #2932
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants