Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 221993 - Bad digest.zip on Ganymede update site
Summary: Bad digest.zip on Ganymede update site
Status: RESOLVED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Cross-Project (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Bjorn Freeman-Benson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-09 19:59 EDT by DJ Houghton CLA
Modified: 2008-03-15 14:08 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DJ Houghton CLA 2008-03-09 19:59:02 EDT
I was running some p2 tests against the Ganymede update site (http://download.eclipse.org/releases/ganymede/site.xml) and I noticed that it was taking longer than expected. Upon further investigation, it seems that we are downloading the digest.zip and trying to parse the features from it, but it was failing and then downloading the individual feature JARs and parsing them.

It looks like the content in the digest file is invalid. It contains several lines like this:
  <includes id="feature.id" version="1.0" optional="true"search-location="2" /> 
Note that there is a missing space between the "optional" and "search-location" attributes.

According to the code in update manager, this bug was fixed by bug 195172 but unfortunately it is not included in any Eclipse Platform releases.

Is it possible to regenerate the digest file on the Ganymede update site with a site optimizer from the 3.4 stream? It would be very helpful to the p2 team since people will be connecting to this site to test the backwards compatibility code.

Looking at and running the old update manager code, it also bails when trying to parse this digest file and logs the following message to the log file:

!ENTRY org.eclipse.update.core 4 0 2008-03-09 19:53:33.320
!MESSAGE Digest could not be parsed:Element type "includes" must be followed by either attribute specifications, ">" or "/>".
Comment 1 Pascal Rapicault CLA 2008-03-09 20:29:25 EDT
We could also get the ganymede update site p2-ized.

I'm not sure which component to move that bug to, so CC'ing Bjorn and Thomas for now.
Comment 2 Kim Moir CLA 2008-03-10 08:50:26 EDT
Moving to cross project.  I don't have rights to run the digest scripts on the Ganyede update site with 3.4 plugins.
Comment 3 Martin Oberhuber CLA 2008-03-13 16:20:16 EDT
As of today (Ganymede M5), on /releases/ganymede there is a digest.zip which seems OK, and a repository.zip

Does this imply that the issue is fixed?
Comment 4 Martin Oberhuber CLA 2008-03-13 16:59:37 EDT
Perhaps not quite, since my .log still shows this when installing from M5 releases/ganymede:

!ENTRY org.eclipse.update.core 4 0 2008-03-13 21:57:05.006
!MESSAGE Digest could not be parsed:Element type "includes" must be followed by either attribute specifications, ">" or "/>".

I tried looking at the digest.zip but cannot see where the problem is. It would be nice if Update Manager logged a line number with the error...
Comment 5 DJ Houghton CLA 2008-03-13 18:40:14 EDT
Martin, if you do a scan for "search you will find a bunch of references. (there is a missing space between the quote and the next 'search-location' attribute name)

I only found the errors by debugging and stepping into the code. (IE and Firefox parse the file ok)

I have opened bug 222680 so we can try and show more information if we come across these errors in p2.
Comment 6 Martin Oberhuber CLA 2008-03-14 12:29:57 EDT
Thanks DJ. In fact the following fixes the digest such that it can be processed correctly:

unzip digest.zip
sed -e 's,"search," search,g' digest.xml > digest.xml.new
mv -f digest.xml.new digest.xml
zip -f digest.zip digest.xml

I'm wondering how the bad XML could creep into the digest. I checked the original feature.xml files for those entries that are corrupted, and they are all OK. In fact I'm unsure where the "search-location" field even comes from. It seems to me as if the digest building script is buggy.

I've been running the digest builder with Eclipse 3.4M5 on Linux like this:

java -jar $LAUNCHER -application org.eclipse.update.core.siteOptimizer \
    -digestBuilder -digestOutputDir="${curdir}/ganymede" \
    -siteXML="${curdir}/ganymede/site.xml"

Does anybody know who's in charge of the digestBuilder and if a bug against Platform/Update would be in order or rather against Equinox?
Comment 7 DJ Houghton CLA 2008-03-14 12:50:47 EDT
Check out bug 195172. It is fixed so any recent digest builder should be good.
Comment 8 Martin Oberhuber CLA 2008-03-14 12:58:14 EDT
Indeed... so I guess that leaves the Europa-o-matic maintainers to upgrade to a newer Eclipse at least for the task of digest building...
Comment 9 Bjorn Freeman-Benson CLA 2008-03-15 14:08:43 EDT
Ganymatic has been updated and when we rebuild the Ganymede release site with a new digest (for M6), this should be fixed (according to bug 195172).