[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#565692: Please allow the package to be upgraded even when OpenOffice is running.



severity 565692 + wishlist
tag 565692 + wontfix
thanks

Hi,

On Sun, Jan 17, 2010 at 03:49:41PM -0800, Daniel Burrows wrote:
>   It's really annoying to start an upgrade of 300 packages, then
> discover that it failed because OpenOffice was one of the 300 and it
> detected a running session.  This results in a dialog box telling me
> that I need to stop the session and one button, "Ok", which causes the
> entire install to blow up.

I agree.

>   I'm assuming you must have had extremely good reasons for coding up
> this behavior, so I won't ask you to remove the dialog.  However, it

Even if I did not code that, any extension install will just fail (and return 0)
anyway.

> would be nice if there was a way to avoid having the install be aborted.
> For instance, you could give this dialog a "Continue" button and an
> "Abort" button that do what they say.  I would be OK with "continue"
> looping back if OpenOffice is still running; the main thing is that I

And you would get a extension (de-)registered when that actually doesn't happen.
That is even worse, since it results in inconsistent state (package installed,
extension not there or the other way round) or broken registry files.

BTW, there's nothing "coded" there, it's a simple debconf error :-)

> want to be able to kill the active session and continue the upgrade
> afterwards.

Then do. If you don't close OOo, the maintainer script will just exit 1.
(The same effect with DEBIAN_FRONTEND="noninteractive"

>   Even if you keep the current scheme unchanged, it would be really
> nice if you could at least change the text to "Abort" or "Abort Install"
> so that it's clear that the install is aborting -- the first few times
> I hit this message I skimmed the text and didn't realize that it was
> actually fatal.  (I don't know if debconf lets you do that, though)

That wouldn't be the truth. If you actually looked at what is done:

        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
                        db_input high openoffice.org/running
                        db_go
                        # 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

You get a second chance after the error in case you then closed the running instance,
so "Abort" would be wrong.

>   It would also be nice if you could display the "ps" lines for the
> offending process -- not everyone can remember that the OpenOffice
> process is actually named "soffice".

If you tell me how I get this into debconf output on the fly..

>   (oh, and there's one other nasty side-effect of this dialog: if the
>    user has configured debconf to be noninteractive, they get a silent
>    failure with no explanation of what happened.  I suggest emitting
>    some sort of error message explaining why the postinst is failing)

True.
Tell that policy, though:

3.9.1 Prompting in maintainer scripts

Package maintainer scripts may prompt the user if necessary. Prompting must be done by communicating through a program, such as debconf, which conforms to the Debian Configuration Management Specification, version 2 or higher. 
[...]

But I might be able to be persuaded to do that (at least in the == noninteractive
case)...

Grüße/Regards,

René
-- 
 .''`.  René Engelhard -- Debian GNU/Linux Developer
 : :' : http://www.debian.org | http://people.debian.org/~rene/
 `. `'  rene@debian.org | GnuPG-Key ID: D03E3E70
   `-   Fingerprint: E12D EA46 7506 70CF A960 801D 0AA0 4571 D03E 3E70



Reply to: