-
Notifications
You must be signed in to change notification settings - Fork 34
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
Breaks order of macro evaluation with %version reference #239
Comments
hmm globals with awk are not a really good idea for once. But yea it should play it safe... Any ideas how to achieve that? |
Feel free to come up with a better idea which doesn't involve lua...
Is there already some kind of variable definition order tracking implemented? If not, it might be a bit difficult indeed... Maybe it could try to keep %global at the same position? |
No evaluation and tracking in the code yet. Well the globals idea was that they should be used only for when they are not depending on external resources as otherwise it "just works" thanks to the command order, while all other expansions are parsed fully first and then expressed. |
@Vogtinator Two choices:
|
|
%version is only defined after
Version:
in the .spec file, which means in combination with %global the order is important.evaluates to
Requires: foo = 1.0
.spec-cleaner converts this to
which evaluates to
Requires: foo = 1.0.5.
as %version is only available after the %global expansion.As a workaround, we switched to
%define
for the time being, but this results in evaluating the command once per macro expansion.The text was updated successfully, but these errors were encountered: