Re: problem while building against libpgsql2 on sparc
On Mon, 2002-10-21 at 23:56, Ben Collins wrote:
> >
> > Unpacking libpgsql2 (from .../libpgsql2_7.2.3-0.2_sparc.deb) ...
> >
> > dpkg: error processing /home/buildd/build/chroot-unstable/var/cache/apt/archives/libpgsql2_7.2.3-0.2_sparc.deb (--unpack):
> > subprocess pre-installation script returned error exit status 1
> >
>
> The bug is in this part of the preinst script:
>
> if [ -d ${PGDATA:=/var/lib/postgres/data} ]
> then
> installed=`cat ${PGDATA}/PG_VERSION 2>/dev/null`
>
>
> On the sparc buildd, /var/lib/postgres/data/PG_VERSION does not exist.
> So the line fails and exists the script non-zero. If he wants that to be
> able to fail, then it needs to look like:
>
> installed=`cat ${PGDATA}/PG_VERSION 2>/dev/null` || true
I don't think this is particularly a sparc problem.
Generally $PGDATA should not exist unless initdb has been run; if initdb
has been run, PG_VERSION should exist. The preinst script does not do
enough checking, but that needs to be cured on all architectures.
Please submit a bug report.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"But what things were gain to me, those I counted loss
for Christ." Philippians 3:7
Reply to: