Re: A basic spec file question

Поиск
Список
Период
Сортировка
От Heath Lord
Тема Re: A basic spec file question
Дата
Msg-id CA+BEBhukkX5ez12RWa6b9vUHTAd7dGsz2pwt+5TWcPP-3LTGpg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: A basic spec file question  (Craig Ringer <craig.ringer@enterprisedb.com>)
Список pgsql-pkg-yum
Devrim,

   The issue is with the "<=" in this line:

%if 0%{?fedora} <= 31 || 0%{?rhel} <= 8 || 0%{?suse_version} >= 1315

   With the "0%{variable}" format you will get "0" whenever a variable
is not defined, so whenever you do a comparison with a "<=" it will
resolve to TRUE when that variable is undefined.  Since fedora and
rhel are never both defined at the same time the above logic will
always resolve to being TRUE.
   Anytime you use this comparison logic to determine whether the
variable is "<="  you will also have to verify that the variable is
defined as well.

Thanks,
   Heath

On Fri, Oct 2, 2020 at 5:38 AM Craig Ringer
<craig.ringer@enterprisedb.com> wrote:
>
> Add a %dump at the end of the spec file body and/or relevant parts throughout to see how it evaluated. %echo macros
areuseful too 
>
> On Fri, 2 Oct 2020, 17:08 Devrim Gündüz, <devrim@gunduz.org> wrote:
>>
>>
>>
>> Hi,
>>
>> I am probably missing a very basic thing, but... What is wrong in this
>> line? I am expecting Fedora 32 and 33 not do depend on CGAL package,
>> but then the Fedora 33 RPM depends on CGAL >= 4.7 .
>>
>>
https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob;f=rpm/redhat/master/common/sfcgal/master/sfcgal.spec;h=2678073373595d042341fe9724db6ccf1f2daacf;hb=b57f568a1eb1780a397d4c25c46c678399048e9b#l26
>>
>> What am I missing?
>>
>> Regards,
>> --
>> Devrim Gündüz
>> Open Source Solution Architect, Red Hat Certified Engineer
>> Twitter: @DevrimGunduz , @DevrimGunduzTR



В списке pgsql-pkg-yum по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: A basic spec file question
Следующее
От: Bruno Lavoie
Дата:
Сообщение: Adding YUM packages to repository