|Well, that's pretty much all the possibilities of pausing :)|
In the scenarios you mention I see a big difference between the case where the user is allowed to reboot his machine (or simply reboot eclipse) and the case where he is not.
If he just wants to pause the install (including download) and then resume it without shutting down eclipse, I think the core aspect of the work could be done relatively simply by checking for pause request in various key points of the installer (mainly engine, dl mgr) in a similar way we check for cancellation today. This would be akin to put a sleep in the middle of the code. The engine would be "hung" and the profile being modified still being locked. I'm not quite sure about the implication on the UI since iirc we rely on the default facilities from the workbench.
Building something that supports reboot is a bit more involving depending on how far we want to go. The minimal thing that would need to happen is to be able to serialize the provisioning plan. With this, it would be possible to continue, after reboot, an installation that had been paused during the download phase. I'm drawing a distinction between download and the rest of the install phase because, once the engine has started through the uninstall / unconfigure / install / configure phases, then it becomes harder because one needs to store the state of the install and some of the operations that have occurred may have been intrusive to the system.
So of all the scenarios you described which one is the most important?
On 2011-08-26, at 3:34 AM, Haigermoser, Helmut wrote:
Hi Pascal J
“pause” an installation would mean: “pause downloading content”, and “pause installing content”, with a “resume” button making p2 continue the process of executing the provisioning plan.
Pausing a download would come in handy if you need to reboot, or go home for the day and want to continue your install the next day. Pausing an install would also be nice in case the installation has to be halted, maybe you need disk I/O for something else and want to wait with the p2 install until later etc. Does this clarify the request?
From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Pascal Rapicault
Sent: Friday, August 26, 2011 2:21 AM
To: P2 developer discussions
Subject: Re: [p2-dev] pausing a p2 operation?
Could you refine what you mean by "pause" and the kind of problem you are trying to address?
I have many ideas on what this could mean but I'd rather not interpret :)
On 2011-08-25, at 11:07 AM, Haigermoser, Helmut wrote:
Ciao @ll J
Our p2-based installer would benefit from a feature where customers pause the the execution of the provisioning plan.
I’ve seen other installers allow pausing the download phase , and now I’m wondering if we could implement the same for p2 as well… Let me know what you think, I can easily kick off a bugzilla here but I thought I’d ask first to see if others would find this feature useful… Implementation-wise I think the p2 core guys should have the biggest say in how this should work, I was hoping for a simple interface using the agent, the prov eventbus or the monitor, like “mymonitor.pause()” or the like…
p2-dev mailing listp2-dev@xxxxxxxxxxxhttps://dev.eclipse.org/mailman/listinfo/p2-dev