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

Bug#724582: message should mention other solutions to 'dpkg was interrupted'



On Thu, Sep 26, 2013 at 9:24 PM,  <jidanni@jidanni.org> wrote:
> reopen 724582
> retitle 724582 Upon ^C say "user interrupted received, will stop at next safe point, please wait..."
> thanks
> DK> ^C isn't blocked, it is noticed and the operation is interrupted at the
> DK> next point where it is (relatively) safe to interrupt the operation
>
> Hmmm, maybe there should be some indication to the user!
> "Caught user interrupt, will process at the very next safe point...".
>
> That way the user will not go on to more destructive kill -9 etc.
> thinking that is the only way!

It is the only way if you want to achieve what you want to achieve …
(as an interrupt is not the same as a kill)

> DK> (aka: at the end of the current dpkg run).
>
> Hmmm, the message could even say "currently on step 7. will stop at the
> 13th of the remaining 124 steps".

… as this "step" can include one or one million packages.
The last step is e.g. usually more than 50% of the entire upgrade.
The step before that is like 49% of the upgrade.
And the 0 - hundreds steps before that are the remaining 1% which
indeed includes only a few packages each (but a point in the middle of
those isn't exactly "safe" in general).

What I meant is not that it is safe to exit here, it is just relatively safe
compared to exit at a random point with kill. It is still not a safe point.
There are only two safe points in an APT operation:
The point before you confirm with "yes" and the point after the operation
has ended naturally and successfully. All other points are NOT safe.¹
There are just some spots which are a bit safer than others, just like
riding on an atomic bomb is not as safe as standing 100m away from it,
but you have a safety problem either way.

(¹ you can be lucky so that some intermediate points are indeed as safe
 as the start/end point as APT is trying to make these points as safe as
 possible, but not so it can be interrupted just because someone thought
 its a good idea, but so there is a possibility of simple recovery after
 a power outage or a similar usually fatal incidences)


Also, while "just" printing something sounds ridiculous easy, its non-trivial
as the screen you see is currently "owned" by dpkg (in the best case) or
by a maintainer script / debconf question (it can't get much worse).
So it is likely that it will be garbled, be it in the middle of another
message or completely overridden, if it happens to be printed on a line
which is intended to display a progress indicator of some sort.


Just forget about the idea of interrupting a running APT/dpkg call,
for the benefit of everyone (including a lot of kittens).


Best regards

David Kalnischkies


Reply to: