[Pkg-postgresql-public] Bug#506728: postgresql-8.3-plr: Does not run ldconfig and does not set R_HOME in postgresql environment

Martin Pitt mpitt at debian.org
Mon Nov 24 17:41:38 UTC 2008


Hi Andreas,

Andreas Tille [2008-11-24 15:32 +0100]:
> The problem is that policy does not allow to change other packages
> configuration files.

That's true, but /etc/postgresql/* is not owned by any package. Those
are the postgresql per-cluster configuration directories which are
created at runtime.

> Am I allowed to eddit the environment file in the postinst of
> postgresql-plr or what is the general policy for this case.

In principle yes. The creation of that file was pretty much motivated
by things like this in the first place, although primarily intended
for user configuration.

However, there are some things to consider:

1. There might be an arbitrary number (including 0) of
   /etc/postgresql/MAJOR_VERSION/CLUSTER_NAME/ directories. So if the
   semantics of -plr should be to allow using R in all already
   existing clusters (which is not unreasonable IMHO), you should add
   it to all of them.

2. This change won't have an effect for clusters which are created
   after installation of -plr.

3. If you do this, please ensure not to add the environment variable
   again if it is already present in the file (including whitespace
   fuzzing).

Of those, 2. is probably the trickiest problem.

However, let's step back a bit. To be honest, the mere existance of
this variable seems wrong to me, since it is pretty much an "unbreak
my system" setting and violates Debian Policy 9.9.

Can't -plr itself be patched to default to /usr/lib/R if R_HOME isn't
set? With that, people can still set it to /usr/local/test/R or
whatever, but it would work OOTB.

If that isn't possible, I have a thought on how to solve 2. more
elegantly, but let's discuss the general approach first.

Thanks, and "guten Abend",

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)



More information about the Pkg-postgresql-public mailing list