Andreas Beckmann <deb...@abeckmann.de>
> WTF is this (found in the prerm script)?
> 
>         if [ ! -f "$HOME/.odbc.ini" ]; then
>                 REMOVE_ODBC_INI=true
>         fi
>         odbcinst -u -s -l -n VOS || true
>         # The previous odbcinst command may create the file $HOME/.odbc.ini
>         # if it didn't exist previously, leaving unowned files after
> removing # the package, so we remove the .odbc.ini if it's neccesary, see:
> # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677286
>         if [ -n "$REMOVE_ODBC_INI" ]; then
>                 rm -f $HOME/.odbc.ini
>         fi

That is my lack of unix wizardry. You may find it disturbing.

> 
> You cannot rely on $HOME !
> If you have something that messes around in /root,
> set HOME to a temporary directory:
> 
>     INSTDIR=`mktemp -d`
>     HOME=$INSTDIR stupid-command-messing-around-in-slash-root
>     if [ -n $INSTDIR ]; then rm -rf $INSTDIR; fi

That indeed would be the correct implementation, instead of what I did.

> If you have something that does not respect $HOME, fix it.
> And odbcinst is such an insanity:
> 
> # HOME=/fooo odbcinst -u -s -l -n VOS
> odbcinst: DSN removed (if it existed at all). ODBC_BOTH_DSN was used as the
> search path. # dd if=/dev/urandom of=/root/.odbc.ini count=1
> # HOME=/fooo odbcinst -u -s -l -n VOS
> odbcinst: SQLRemoveDSNFromIni failed with Unable to find component name.

Thank you very much. I think you have just pasted above two evidences of the 
real problem: it's not that it does the same as "touch /root/.odbc.ini" (which 
would be somewhat harmless), it's just that the -l option is being ignored. 
Therefore I changed again the prerm script to execute odbcinst setting the 
ODBCSEARCH env var, which should override the options given in the command 
line.

I have prepared package with the intended fix, would you be so kind to test it 
again in your piuparts stuff? it's available temporarily here:
http://alioth.debian.org/~santa-guest/packages/virtuoso-odbcinst-bug/
for the record, I'm attaching the debdiff against the -2 version.

If it's more convenient for you I could even upload it and hope for the best.

Thanks.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to