Re: [PATCH v1] [meson] add a default option prefix=/usr/local/pgsql

2022-10-01 Thread Andres Freund
Hi, On 2022-09-30 19:07:21 -0700, Andres Freund wrote: > The attached 0001 calls into a meson helper command to do this. Not > particularly pretty, but less code than before, and likely more reliable. I pushed Junwang Zhao's patch together with this change, after adding a comment to the setting o

Re: [PATCH v1] [meson] add a default option prefix=/usr/local/pgsql

2022-09-30 Thread Andres Freund
Hi, On 2022-09-30 21:19:03 -0400, Tom Lane wrote: > Andres Freund writes: > > I see two potential ways of dealing with this reliably on windows: - error > > out > > if a prefix is not drive-local, that's easy enough to check, something like: > > normalized_prefix.startswith('/') and not normaliz

Re: [PATCH v1] [meson] add a default option prefix=/usr/local/pgsql

2022-09-30 Thread Tom Lane
Andres Freund writes: > I see two potential ways of dealing with this reliably on windows: - error out > if a prefix is not drive-local, that's easy enough to check, something like: > normalized_prefix.startswith('/') and not normalized_prefix.startswith('//') > as the installation on windows is r

Re: [PATCH v1] [meson] add a default option prefix=/usr/local/pgsql

2022-09-30 Thread Andres Freund
Hi, On 2022-09-30 10:17:37 -0700, Andres Freund wrote: > Agreed - I was just trying to give background. I'm inclined to just go for > Junwang Zhao's patch for now. That turns out to break tests on windows right now - but it's not the fault of the patch. Paths on windows are just evil: We do the

Re: [PATCH v1] [meson] add a default option prefix=/usr/local/pgsql

2022-09-30 Thread Andres Freund
Hi, On 2022-09-30 13:13:29 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2022-09-30 08:59:53 -0700, Andres Freund wrote: > >> On 2022-09-30 11:45:35 -0400, Tom Lane wrote: > >>> Can we have a platform-dependent default? > > >> Not easily in that spot, I think. > > > For background: The

Re: [PATCH v1] [meson] add a default option prefix=/usr/local/pgsql

2022-09-30 Thread Tom Lane
Andres Freund writes: > On 2022-09-30 08:59:53 -0700, Andres Freund wrote: >> On 2022-09-30 11:45:35 -0400, Tom Lane wrote: >>> Can we have a platform-dependent default? >> Not easily in that spot, I think. > For background: The reason for that is that meson doesn't yet know what the > host/buil

Re: [PATCH v1] [meson] add a default option prefix=/usr/local/pgsql

2022-09-30 Thread Andres Freund
Hi, On 2022-09-30 08:59:53 -0700, Andres Freund wrote: > On 2022-09-30 11:45:35 -0400, Tom Lane wrote: > > Andres Freund writes: > > > One concern with that is that default would also apply to windows - > > > autoconf > > > didn't have to care about that. I just tried it, and it "just" ends up >

Re: [PATCH v1] [meson] add a default option prefix=/usr/local/pgsql

2022-09-30 Thread Andres Freund
Hi, On 2022-09-30 11:45:35 -0400, Tom Lane wrote: > Andres Freund writes: > > One concern with that is that default would also apply to windows - autoconf > > didn't have to care about that. I just tried it, and it "just" ends up > > installing it into c:/usr/local/pgsql (assuming the build dir i

Re: [PATCH v1] [meson] add a default option prefix=/usr/local/pgsql

2022-09-30 Thread Tom Lane
Andres Freund writes: > On 2022-09-30 23:21:22 +0800, Junwang Zhao wrote: >> autoconf set PREFIX to /usr/local/pgsql, so I think we should >> do the same in meson build. > That makes sense. +1 > One concern with that is that default would also apply to windows - autoconf > didn't have to care a

Re: [PATCH v1] [meson] add a default option prefix=/usr/local/pgsql

2022-09-30 Thread Andres Freund
Hi, On 2022-09-30 23:21:22 +0800, Junwang Zhao wrote: > autoconf set PREFIX to /usr/local/pgsql, so I think we should > do the same in meson build. That makes sense. One concern with that is that default would also apply to windows - autoconf didn't have to care about that. I just tried it, and

[PATCH v1] [meson] add a default option prefix=/usr/local/pgsql

2022-09-30 Thread Junwang Zhao
autoconf set PREFIX to /usr/local/pgsql, so I think we should do the same in meson build. This will group all the targets generated by postgres in the same directory. -- Regards Junwang Zhao 0001-meson-add-a-default-option-prefix-usr-local-pgsql.patch Description: Binary data