On 11.01.23 12:05, Peter Eisentraut wrote:
> 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.
Here is a proposed patch. This should fix all these issues.