Problem:
Hung on a spec file that contains a seemingly self referential macro ...
Version: %{_version}
Normally 'Version: x.y.z' has the effect of setting macro %{_version}.
In effect we have 'x=x'. Not sure how rpm handles this, but we need to
prevent a recursion in our evaluation scripts.
Solution:
1) Test for recursion in spec_evaluate() and fail rather than
entering into a recursion.
2) Record the version from the srpm file name into an environment variable.
If we fail to read the version from the spec file directly, substitute
the one from the environment variable, if defined.
Note: Tripped up on mismatched '`' during testing, so substituted
all occurances with $(). Now a good browser should be able to
highlight an future mismatches.
Story: 2002839
Task: 22778
Change-Id: Ib69f879e531d842ff007d473bd3ad34db46cabf1
Signed-off-by: Scott Little <scott.little@windriver.com>