[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Processing of binary IUs

On 2013-06-26 10:12, Vladimir Prus wrote:
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

I would argue that it does. There's nothing that restricts the installation from modifying the file once it has been installed. If you have multiple instances, then one instance might corrupt the file from other instances. I.e. the downloaded copy is immutable, the installed copy is not.

Also, regarding revert -- cannot P2 have some transactional model, so that if an operation is not fully done,
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.
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.

Thomas Hallgren