Package: odbc-postgresql
Version: 1:09.02.0100-2

I have a version of unixODBC installed on my system in an alternative
location (e.g. /opt/localtools), that I built myself from source.  I'm
using it for other things, not related to the system packages.  In my
user account ~/.bashrc (not root) I have added /opt/localtools/bin to my
$PATH.  In order for my environment to work properly I need to have this
directory on my $PATH _first_, before /bin, /usr/bin etc.

I then tried to install odbc-postgresql using the standard:

    $ sudo apt-get install odbc-postgresql

This failed in strange and difficult to diagnose ways.  The package
uninstall also failed in inscrutable ways.


The problem ended up being that the Debian inst and rm scripts are
invoking the "odbcinst" command without setting $PATH first, so those
scripts use whatever version of odbcinst happens to appear first on
$PATH.

Because running "sudo apt-get ..." does not reset the environment to the
root account's environment, apt-get is running with my user account
$PATH, not root's $PATH, and the Debian scripts were finding and
using /opt/localtools/bin/odbcinst instead of /usr/bin/odbcinst, leading
to havoc.

I think that the Debian scripts should add something like:

    PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH

or similar at the top, so they're sure to get the system version of
underlying tools such as "odbcinst".


I found this problem on my Mint 14 system but I checked the scripts in
the Debian sid package .debian.tar.gz and see the same situation.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to