assistance with ubuntu-docs bug

Matthew East mdke at ubuntu.com
Thu Apr 2 08:23:13 BST 2009


Hi,

On Mon, Mar 30, 2009 at 9:01 AM, Steve Langasek
<steve.langasek at ubuntu.com> wrote:
>> ma, 2009-03-30 kello 08:10 +0100, Matthew East kirjoitti:
>> > So we need something in the package maintainer scripts which will
>> > remove the symlink and permit the package to install the relevant
>> > files in its place. The relevant commands have been posted in comment
>> > 15 on the bug, but I don't know how to include these in the package.
>> > Is someone able to help?
> postinst:
>
> ---- 8< ----
> #!/bin/sh
>
> set -e
>
> link=/usr/share/gnome/help/libs
> if [ -d "$link" ] && ! [ -L "$link" ] && [ "$1" = configure ] \
>   && dpkg --compare-versions "$2" lt-nl <version-which-fixes-this>
> then
>        rmdir "$link"
>        ln -s ../../ubuntu-docs/libs "$link"
> fi
>
> #DEBHELPER#
>
> ---- 8< ----
>
> Another benefit of doing this in the postinst is that if something else has
> added files under /usr/share/gnome/help/libs without talking to you, the
> maintainer script will abort instead of silently rm -r'ing the files.

This solution has been implemented in version 9.04.7 of ubuntu-docs
(after a hiccup in version 9.04.6) and seems to have fixed the bug for
most people.

However, there is one bug that has arisen out of it for users who had
edubuntu-docs installed, because edubuntu-docs ships a couple of files
in the directory /usr/share/gnome/help/libs. I hadn't been aware of
this previously.

https://bugs.launchpad.net/ubuntu/+source/ubuntu-docs/+bug/353288

For those users, dpkg doesn't seem to want to remove the directory
because it isn't empty, and the package upgrade therefore fails.

I think edubuntu-docs needs to be amended somehow, probably so that it
also uses the symlink and ships those files in the directory
/usr/share/ubuntu-docs/libs instead. But I'd appreciate some advice
about the best way to deal with this bug.

-- 
Matthew East
http://www.mdke.org
gnupg pub 1024D/0E6B06FF



More information about the ubuntu-devel mailing list