Comment 2 for bug 545241

Revision history for this message
Matt Zimmerman (mdz) wrote :

This is caused by:

check_for_running_ooo() {
        if [ -e /usr/lib/openoffice/program/bootstraprc ]; then
                LOCKFILE="`grep UserInstallation /usr/lib/openoffice/program/bootstraprc | cut -d= -f2 | sed -e 's,SYSUSERCONFIG,HOME,'`/.lock"
                PID=`pgrep soffice.bin | head -n 1`
                if [ -n "$PID" ] || [ -e "$LOCKFILE" ]; then
                        if [ "$DEBIAN_FRONTEND" = "noninteractive" ]; then
                                echo "OpenOffice.org running!" >&2
                                echo "" >&2
                                echo -n "OpenOffice.org is running right now with pid " >&2
                                echo -n "$PID." >&2
                                echo " This can cause problems" >&2
                                echo "with (de-)registration of components and e
xtensions" >&2
                                echo "Thus this package will fail to install" >&2
                                echo "You should close all running instances of OpenOffice.org (including" >&2
                                echo "any currently running Quickstarter) before proceeding with the package" >&2
                                echo "upgrade." >&2
                                exit 1
                        else
                                db_input high shared/openofficeorg-running || true
                                db_go || true
                                # try again in case OOo got closed before hitting OK
                                PID=`pgrep soffice.bin | head -n 1`
                                if [ -n "$PID" ] || [ -e "$LOCKFILE" ]; then
                                        exit 1
                                fi
                        fi
                fi
        fi
}

If OOo can't be safely upgraded while running, aborting the upgrade doesn't seem like the ideal way to handle this. Alternatives:

- Just go ahead, and warn the user that they need to take action (as Firefox does)
- Keep checking until the user has closed the application
- Work around whatever breakage happens if it's upgraded in place