Re: Please stop re-adding gtk-update-icon-cache scriptlets (for Fedora)

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

 



On Fri, Jan 19, 2018 at 9:01 AM, J. Randall Owens
<jrowens.fedora@xxxxxxxxxxx> wrote:
> On 18/01/18 19:45, Sérgio Basto wrote:
>> On Thu, 2018-01-18 at 20:17 +0100, Igor Gnatenko wrote:
>>> Hello,
>>>
>>> I'm working on removing all this cruft from all our packages (and
>>> creating
>>> conditionals for all packages which have epel branch).
>>
>>> Unfortunately some maintainers adding them back with conditionals
>>> like:
>>> %if 0%{?fedora} < 28 || 0%{?rhel} < 8
>>>
>>> 1. Those scriptlets are not needed since ~ F24 era
>>> 2. You might not know, but 0%{?rhel} on Fedora evaluates to "0" which
>>> is "< 8",
>>> so those scriptlets are active.
>>>
>>> Also forgive me if your package had some EL* specific conditions and
>>> I removed
>>> scriptlets (because there was no epel* branch) -- please use
>>> %if 0%{?rhel} && 0%{?rhel} <= 7
>>>
>>> for them.
>>
>> Hello ,
>> BTW I have some questions on how exactly we should deal with EPEL 7 and
>> 6, from old wiki page [1] desktop-database and  mimeinfo  have been
>> removed and Icon cache too ?  IMHO these info should still be in wiki
>> and not deleted, maybe also should explain the status on EPEL versions
>> ...
>>
>> Maybe more correct scriptlet is:
>> %if 0%{?fedora} < 25 && 0%{?rhel} < 8
>
> I'm not even the best at bash, much less the scripting in spec files,
> but is it possible this would be a problem because e.g. Fedora 26 would
> be evaluated as 026, which would evaluate as octal, and therefore the
> conditional evaluate as 22 < 25, true, when it was meant to be false?
>

No, RPM always evalutes `%if` with decimal (i.e. base 10) numbers.

Technically, this condition would work if you assume that at least one
of those will always be defined. But it's not hard to accidentally
break these.

And there are derivatives and others that would rebuild or build based
on this and the condition would trigger bad logic unnecessarily.

-- 
真実はいつも一つ!/ Always, there's only one truth!
_______________________________________________
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