I think there might be an error on the following wiki page
http://fedoraproject.org/wiki/Packaging/DistTag
There are examples there like this:
# If on Fedora 8, Requires: foo
%{?fc8: Requires: foo}
But if fc8 is defined you get an rpm error stating
Unknown tag: Requires: foo
After much fooling around I think I tracked the problem down to the fact
RPM won't tolerate any white space in front of the "Requires:", I
finally recalled that RPM will choke if it sees indentation in certain
places in the spec file. The net effect of the macro on the wiki was
that "Requires:" was indented by 1 space.
It seems like it has to be:
%{?fc8:Requires: foo}
I will update the wiki but I thought I would sanity check my conclusion
first.
IMHO RPM's parsing is way too fragile, it took me a while before it
occurred to me it was the space character causing the error. The error
message wasn't very helpful either, did anybody else notice there were
two spaces between the "Unknown tag:" and the "Requires" in the error
message implying the tag was " Requires" and not "Requires"?
John
--
Fedora-packaging mailing list
Fedora-packaging@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-packaging