Bug#401372: iceape-browser: crashes on startup

Andreas Barth aba at not.so.argh.org
Sat Dec 23 11:16:07 CET 2006


* Mike Hommey (mh at glandium.org) [061223 11:04]:
> On Sat, Dec 23, 2006 at 10:58:03AM +0100, Andreas Barth <aba at not.so.argh.org> wrote:
> > How can we check if files are generated by update-iceape-chrome? Or
> > should we just assume any file is generated by update-iceape-chrome?
> 
> As far as the chrome directory is concerned, update-iceape-chrome
> generates the following files:
> installed-chrome.txt
> chrome.rdf
> overlays.rdf
> stylesheets.rdf
> 
> All these files are moved to /var after being generated, and a symlink
> to the new location is put in the chrome directory.

Ok, so the script could look like:

if [ -d /usr/lib/iceape/chrome ] && ! [ -L /usr/lib/iceape/chrome ]; then
    # files autogenerated by update-iceape-chrome - we can remove them
    for file in installed-chrome.txt chrome.rdf overlays.rdf stylesheets.rdf; do
        rm -f /usr/lib/iceape/chrome/$file;
    done

    # move any remainings to the new directory unless they are there already
    find . -maxdepth 1 -mindepth 1 -exec mv --reply=no {} /usr/share/iceape/chrome/ \;

    # kill directory - if it fails, the user needs to work by hand
    if ! rmdir /usr/lib/iceape/chrome; then
        # we don't i18n this - it shouldn't happen within the stable release, but only
        # for people running testing or unstable
        echo "The directory /usr/lib/iceape/chrome needs to be empty or a symlink to /usr/share/iceape/chrome"
        echo "Please clean it up and execute "dpkg --configure iceape"
        exit 1
    fi
    ln -s /usr/share/iceape/chrome /usr/lib/iceape/chrome
fi

(This script is untested - it just writes down my ideas. If we need the mv - no idea.)


Cheers,
Andi
-- 
  http://home.arcor.de/andreas-barth/




More information about the pkg-mozilla-maintainers mailing list