Re: New horology failure - Mailing list pgsql-hackers

From Tom Lane
Subject Re: New horology failure
Date
Msg-id 17088.1085453556@sss.pgh.pa.us
Whole thread Raw
In response to Re: New horology failure  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: New horology failure  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: New horology failure  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Well, in the case you have an install prefix of /usr, we wouldn't want
> relative installs because you would have /usr/bin and
> /usr/lib/postgresql and that wouldn't be relocatable.

Why not?

ISTM that the algorithm should go something like this:

1. Take PGBINDIR and strip off the last component (presumably "bin").

2. See if this matches the configured SHAREDIR, PKGLIBDIR, or whatever  *for as many components as are in the stripped
BINDIR*. Do not  assume that SHAREDIR must have the same number of components.
 

3.  If match, then what you should do is use the remaining unmatched   part of SHAREDIR etc as what to append to the
trimmedexec_path.
 

For example given the test situation I had:

PGBINDIR = '/home/tgl/testversion/bin'
PGSHAREDIR = '/home/tgl/testversion/share/postgresql'
my_exec_path = '/home/tgl/pgsql-list/src/test/regress/./tmp_check/install//home/tgl/testversion/bin/postmaster'
ret_path = '/home/tgl/testversion/share/postgresql'

what *should* have happened was compare /home/tgl/testversion to
/home/tgl/testversion, decide they agree, and extract share/postgresql
as the part to attach to my_exec_path.  Then you'd strip two components
from my_exec_path ("bin" and program name) and attach
"share/postgresql".  Voila ... right answer.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Ingres to be released as open source
Next
From: Tom Lane
Date:
Subject: Re: log_statement and Parse/Bind