On Thu, 2011-08-18 at 21:57 +0200, Göran Uddeborg wrote:
Tom Callaway:
%namev%version
Is the macro %namev? %name? %na?
Michael Schwendt:
RPM may accept it, but it cannot always parse it correctly either:
echo "a=b" > %nameconfig.cfg
won't do the right thing even with %name being defined by default.
Are you joking? Or am I missing something? Of course, it means %namev and %nameconfig respectively.
Reusing the analogy with the shell, if you in a shell script see the code
echo $PATHTYPE
would you be unsure if that meant the value of the variable PATH followed by the string "TYPE", or if it meant the value of the variable PATHTYPE? I don't think you would.
Save for Fortran, in all programming languages I can recall the parser takes the longest sequence of characters that is a valid token to be the next token from the input.
I don't understand what you find so different in the spec file case.
spec. files are _not_ a programming language. You can't do loops, for example. Even reassigning variables is ... unwise. As a related point, a significant number of people who want to look at them are not programmers. In general I'd expect to see %{foo} for normal variables and %foo for "special" variables, like %add_to_maven_depmap or %py_byte_compile etc.
Tom Callaway:
It is sloppy form.
Oh, come on! I understand you prefer the style with brackets. And your opinion certainly has much more weight than mine in Fedora.
Indeed ... most of the reason for FPC and the guidelines is because "good" consistency is better than "perfect" uniqueness. There are over 10,000 source packages in F15 GA, it makes a big difference.