From: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: meson oddities |
Date: | 2023-01-11 11:05:34 |
Message-ID: | 2214b8bb-d3e2-5978-049b-43eda65a66a2@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2023-01-11 11:05:52 | Re: [EXTERNAL] Re: [PATCH] Support using "all" for the db user in pg_ident.conf |
Previous Message | wangw.fnst@fujitsu.com | 2023-01-11 10:50:28 | Adjust the description of OutputPluginCallbacks in pg-doc |