Hi,

On 2022-01-23 18:31:44 -0500, Tom Lane wrote:
> Andres Freund <and...@anarazel.de> writes:
> > On 2022-01-23 18:11:41 -0500, Tom Lane wrote:
> >> Anyway, trying to figure out whether we're on a Debian package with this
> >> mistake doesn't seem any cleaner than what I proposed.  (In particular,
> >> blindly changing to a different scheme without a check to see what's really
> >> in the filesystem seems doomed to failure.)
> 
> > If we make it depend on _get_default_scheme() == 'posix_local' that 
> > shouldn't
> > be a risk, because that's the debian addition...
> 
> Yeah, but we don't know whether there are any versions of the Debian
> packaging in which they fixed the file layout, so that 'posix_local'
> actually does describe the layout.

I think posix_local try to achieve something different than what you assume it
does. It's intended to return the location to which "locally" intalled python
extension install their files (including headers) - after having the problem
that such local python package installations overwrite (and thus broke) files
installed via the system mechanism.

So posix_local works "by design" if it returns paths in /usr/local that do not
contain a python installation. If it did, it wouldn't achieve the goal.

It's definitely crappily documented. And probably not a great approach as a
whole. But...

Greetings,

Andres Freund


Reply via email to