Re: RPM macros - case insensitive since Fedora 27 (maybe Fedora 26)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/24/2017 06:08 PM, Jonathan Wakely wrote:
> On 24/05/17 17:58 +0200, Zdenek Dohnal wrote:
>> On 05/24/2017 05:49 PM, Jonathan Wakely wrote:
>>> On 24/05/17 17:32 +0200, Zdenek Dohnal wrote:
>>>> Hi,
>>>>
>>>> I was doing rebase for gutenprint pre-release in recent rawhide (fc27)
>>>> and I couldn't build it because I had %VERSION macro defined by myself
>>>> and it got rewritten by default macro %version. That indicates rpm
>>>> macros have been case insensitive since fc27 (colleague told me the
>>>> same
>>>> situation is in fc26 too, but I encountered it in fc27).
>>>
>>> Isn't this because "Version" is the name of a tag? Just like Name and
>>> Release. And Tag names are not case-sensitive, so you could write this
>>> in your spec file:
>>>
>>> VERSION: 12.34
>>>
>>> Reusing those for your own macros seems like a very bad idea and bound
>>> to lead to confusion. Does %version refer to the VERSION tag? Or does
>>> %VERSION refer to that?
>> %{VERSION} contains %{version}-%{prever}. AFAIK macro %{version}
>> contains value for Version: tag, so I defined other macro %{VERSION}.
>> And I thought macros are case sensitive. I worked fine this way before.
>
> And my point is that "the Version: tag" is not case-sensitive, so can
> be written in a spec-file as VERSION: or VeRsIoN: or any other
> variation, so defining any macro like VERSION of version or Version is
> a bad idea. It can only lead to confusion.
>
> Wouldn't %{PKG_VERSION} or %{VERSION_EXTRA} or something be a better
> name for your macro?
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?
> _______________________________________________
> devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx

-- 
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


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux