On 05/25/2017 03:20 PM, Jonathan Wakely wrote:
On 25/05/17 09:23 +0200, Zdenek Dohnal wrote:
> Yes, you are right - I should use some prefix for it to clearly
> distinguish these two macros. I originally thought the only one and
> unique macro for Version: tag is only %{version} and %{VERSION} etc. are
> different (because I thought all macros are case sensitive - I didn't
> know that macros for tags are case insensitive lately). But %{VERSION}
> macro worked well until Fedora 27, so this insensitivity was introduced
> during fc26/fc27. Wouldn't it be better to create some guidelines for
> RPM macros like "You mustn't create your RPM macros without some
prefix"
> rather than making macros for tags case insensitive?
The tags themselves are case-insensitive, but the macros aren't.
%{VeRsIoN} is not automatically defined. I just did a quick test and
%it looks like only %{VERSION} and %{version} are. Even %{Version} is
not. And I don't see %{VERSION} defined in an f26 mock build, only for
rawhide.
You're correct. Difference in macros (from output of 'rpm
--showrc'):
- Fedora 25:
RPM_PACKAGE_VERSION="%{version}" (and rpm uses this macro everywhere)
- Fedora 27:
RPM_PACKAGE_VERSION="%{VERSION}" (and uses %{VERSION} and %{version}
in other built-in macros - IMO it can be confusing too, if packager
doesn't know this only macro is case insensitive)
But I still think relying on %VERSION and %version to mean two
different things makes your spec confusing.
You're right, I'll change it by Jose suggestion. My original question
was why this macro change was introduced, when previous macro worked fine.
_______________________________________________
devel mailing list -- devel(a)lists.fedoraproject.org
To unsubscribe send an email to devel-leave(a)lists.fedoraproject.org
--
Zdenek Dohnal
Associate Software Engineer
Brno, Purkyňova 99, Czech Republic
RED HAT | TRIED. TESTED. TRUSTED.
Every telecommunications Company in the Fortune Global 500 relies on Red Hat.
Find out why at Trusted | Red Hat