|Re: [p2-dev] Processing of binary IUs|
On 15.06.2013 02:14, Pascal Rapicault wrote:When we designed p2 we wanted to separate the download from the installation. There are several reasons for this:
- Be able to download everything in advance of the installation. This is necessary when you are trying to deploy the same app on a large
number of machine and want to guarantee some sort of atomicity.
- Not modify the install until everything has been downloaded. In the case of eclipse many files are being downloaded which means that there
are many chances for things to go wrong (dropped connection, corruption, etc.). If you start modifying the install while things are being
downloaded, if things are going wrong then you will need to revert (which p2 can do), yet if you can avoid this it is always better.
I suppose I understand the motivation, but not sure it's always good. Say, if I download from internet, then local copy would allow to
be more robust in case of failures, or resume download later, etc.
However, if my case I have local repository already. Copying big files from one local location to another does not add any more
Also, regarding revert -- cannot P2 have some transactional model, so that if an operation is not fully done,You might end up with an inconsistent install since it involves actions like unzipping. It might involve other actions as well and p2 doesn't really limit what installers might do (this is controlled through touchpoints and their behavior can be extended by the publisher of the software). What you can do though, is to simply delete the installation from disk and then install again, without downloading. So again, keeping download and install separate is a good thing.
then it's reverted automatically. For example, if I am unpacking huge binary IU from binary cache, and the computer is rebooted
for any reason, do I end up with inconsistent install? Basically, binary cache does protect against download failures, but
it does not protect against other failures.
Regards, Thomas Hallgren