Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 258115 - [ui] The download size always seems to be zero when updating
Summary: [ui] The download size always seems to be zero when updating
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Matthew Piggott CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-09 11:23 EST by Pascal Rapicault CLA
Modified: 2009-02-04 10:56 EST (History)
2 users (show)

See Also:


Attachments
screen shot showing update sizes (37.46 KB, image/jpeg)
2008-12-09 13:08 EST, Susan McCourt CLA
no flags Details
Breakpoints (5.96 KB, application/octet-stream)
2008-12-10 12:21 EST, Pascal Rapicault CLA
no flags Details
Adds a call to compute size when initialResolution is not null (1.01 KB, patch)
2009-02-03 11:25 EST, Matthew Piggott CLA
susan: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2008-12-09 11:23:52 EST
I20081209-0100
When I'm going through an update, it seems that the download size displayed in the wizard seems to always be zero. However if from the same repo I try to install some content, the size is properly computed.
The example I have is:
- Download the platform binary I20081208-x
- Add the I build site
- Look for an update, notice the 0 size
- Now go to the install dialog and click try to install the SDK, you will notice a size.
Comment 1 Susan McCourt CLA 2008-12-09 11:44:31 EST
The size is retrieved the same way in both dialogs (shared code), so I suspect it has more to do with differences in the provisioning plan.  Could this be related to bug 225759?
Comment 2 Susan McCourt CLA 2008-12-09 13:08:22 EST
Created attachment 119940 [details]
screen shot showing update sizes

The problem is more specific than just updating, I am seeing update sizes when updating the SDK and other features.  Is the problem the level at which you are trying to update (no sizes on the platform but they are on the SDK?)
Comment 3 Pascal Rapicault CLA 2008-12-10 12:21:34 EST
Created attachment 120077 [details]
Breakpoints

I have debugged through this with the attached breakpoints and the sizing operation is not called when we are looking for an update. However it is definitely called when doing an install.
Comment 4 Matthew Piggott CLA 2009-02-03 11:25:29 EST
Created attachment 124562 [details]
Adds a call to compute size when initialResolution is not null

The reason this problem is occurring is that Updates create a ComputeSizingWizardPage with a non-null initialResolution.  The computeSizing method is called during a recompute, which in turn only is called only when the resolution is null.  To fix this I've created a patch which calls computeSizing in the constructor of ComputeSizingWizardPage if it is created with a non-null initialResolution.

Incidentally UpdateWizardTest is providing null as the initialResolution.
Comment 5 Susan McCourt CLA 2009-02-03 13:30:32 EST
committed patch with some slight modifications (setting the size variable if there is no initialResolution, some comments, etc.)

This fixes what Pascal noticed in comment #3 (no computation was performed).

However, I am still seeing 0 update sizes for everything I tried.  On the other hand, I'm seeing 0 install sizes for the same items.  So maybe that is covered in another bug.   

Matt, should I mark this fixed under the assumption that other bugs deal with 0 sizes?

Comment 6 Matthew Piggott CLA 2009-02-03 14:57:22 EST
Actually, when I self-host I see the size when updating the Eclipse SDK from v3.5-I20090129-1800 to v3.5-I20090202-1535 using http://download.eclipse.org/eclipse/updates/3.5-I-builds   
However it does take ~5-10 seconds before switching from Unknown to a value.  

Perhaps something about the update site is affecting the calculation, testing http://www.eclipse.org/equinox/p2/testing/updateSite I see 0 bytes for all files, updates & new installs.
Comment 7 Pascal Rapicault CLA 2009-02-04 10:56:57 EST
I think we might have hit an old style update site, which would have caused the 0 size. Closing as fixed for now.