Re: meson oddities

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: meson oddities
Дата
Msg-id 2214b8bb-d3e2-5978-049b-43eda65a66a2@enterprisedb.com
обсуждение исходный текст
Ответ на Re: meson oddities  (Andres Freund <andres@anarazel.de>)
Ответы Re: meson oddities  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
On 04.01.23 23:53, Andres Freund wrote:
>>   dir_data = get_option('datadir')
>> -if not (dir_data.contains('pgsql') or dir_data.contains('postgres'))
>> +if not ((dir_prefix/dir_data).contains('pgsql') or (dir_prefix/dir_data).contains('postgres'))
>>     dir_data = dir_data / pkg
>>   endif
> Hm. Perhaps we should just test once whether prefix contains pgsql/postgres,
> and then just otherwise leave the test as is? There afaict can't be a
> dir_prefix/dir_* that matches postgres/pgsql that won't also match either of
> the components.

You mean something like

     dir_prefix_contains_pg =
       (dir_prefix.contains('pgsql') or dir_prefix.contains('postgres'))

and

     if not (dir_prefix_contains_pg or
            (dir_data.contains('pgsql') or dir_data.contains('postgres'))

Seems more complicated to me.

I think there is also an adjacent issue:  The subdir options may be 
absolute or relative.  So if you specify --prefix=/usr/local and 
--sysconfdir=/etc/postgresql, then

     config_paths_data.set_quoted('SYSCONFDIR', dir_prefix / dir_sysconf)

would produce something like /usr/local/etc/postgresql.

I think maybe we should make all the dir_* variables absolute right at 
the beginning, like

     dir_lib = get_option('libdir')
     if not fs.is_absolute(dir_lib)
         dir_lib = dir_prefix / dir_lib
     endif

And then the appending stuff could be done after that, keeping the 
current code.




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

Предыдущее
От: "wangw.fnst@fujitsu.com"
Дата:
Сообщение: Adjust the description of OutputPluginCallbacks in pg-doc
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [EXTERNAL] Re: [PATCH] Support using "all" for the db user in pg_ident.conf