Hi Brendan,

Brendan O'Dea [2007-08-04 22:01 +1000]:
> This is documented behaviour.  See section 6.6 (4) of Debian Policy:
> 
>   "A directory will never be replaced by a symbolic link to a directory
>    or vice versa; instead, the existing state (symlink or not) will be
>    left alone and `dpkg' will follow the symlink if there is one."

Oh, weird; thanks for pointing this out. 

Is there also a common practice how to perform this correctly then? Currently I
have this nasty bit in postinst:

if [ "$1" = configure ]; then
    if ! [ -L /usr/share/postgresql/8.2/timezone ]; then
        rmdir /usr/share/postgresql/8.2/timezone
        ln -s ../../zoneinfo /usr/share/postgresql/8.2/timezone
    fi
fi

Thanks,

Martin

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

Attachment: signature.asc
Description: Digital signature

Reply via email to