Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 263078 - Software Updates only works in 1 of 3 workflows
Summary: Software Updates only works in 1 of 3 workflows
Status: RESOLVED DUPLICATE of bug 184022
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 3.3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Update-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-30 13:11 EST by Zhongyu Zhang CLA
Modified: 2009-02-04 17:44 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zhongyu Zhang CLA 2009-01-30 13:11:38 EST
Build ID: Version: 3.3.2 Build id: M20080221-1800

Steps To Reproduce:
Hello,

We build some features based on Eclipse 3.3.2. We also build a update site for our features (a root feature and other individual features). When using software updates for our features, only 1 of 3 workflows works. 

1) Use Help->Software Updates->Find and Install->Search for new features to install, it can locate the remote site and update works.
2) Use Help->Software Updates->Find and Install->Search for updates of the currently installed features, it only found Eclipse and a few other bundled third party features (e.g. subclipse). But it didn't find update of our features (it indeed checked our update site during the search process).
3) Use Help->Software Updates->Manage Configuration, it lists our root feature and other individual features in the left panel. If I Scan for Updates for the root feature, it simply says "No updates for the currently installed features found, try again later". If I Scan for Updates for individual features, it shows "no update found" too and in addition, it pops up "Problem Occurred" dialog and saying "Update Manager (Time of error: ) Reason: /by zero.

Note that we indeed have a newer version (3.3.0 installed, 3.3.1 on update site) available. The first workflow works so the URLs in the feature.xml and site.xml should be correct. Is there anything I am missing? 

Thank you very much,
Zhongyu

More information:
Comment 1 John Arthorne CLA 2009-02-01 22:17:05 EST

*** This bug has been marked as a duplicate of bug 184022 ***
Comment 2 Zhongyu Zhang CLA 2009-02-02 19:10:31 EST
Hi,

I understand that "/ by zero" bug is a duplicate of Bug 184022. But I still wonder why workflow 2 and 3 don't work when scanning for update. Do you know whether this is related to the bug 184022 or it's something missing in our features.

Regards,
Zhongyu

Comment 3 John Arthorne CLA 2009-02-03 10:07:30 EST
Updates are driven by the "update" URL provided in your feature.xml. Your feature.xml should have an entry like this:

   <url>
      <update label="updateSiteName" url="http://your.update.site/goes/here">
   </url>

That is the only site that will be used to search for updates for your feature.
Comment 4 Zhongyu Zhang CLA 2009-02-03 18:01:25 EST
We do have this entry in the feature.xml files like this:

   <url>
      <update label="updateSiteName" url="http://your.update.site/goes/here"/>
      <discovery label="updateSiteName" url="http://your.update.site/goes/here"/>
   </url>

Our site.xml on update site looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<site>
   <feature url="features/jarname_w.x.y.x.jar" id="feature.id" version="w.x.y.x">
      <category name="category name"/>
   </feature>
 ...
   <category-def name="category_name" label="Category Name"/>
</site>

This url does work in the first workflow as I described. I just wonder whether workflow 2 and 3 check something else. It should find the same update files.

Regards,
Zhongyu
Comment 5 John Arthorne CLA 2009-02-04 13:33:13 EST
Workflows 2 and 3 are certainly different from 1. Workflow 1 is an install operation - it doesn't use the URLs from feature.xml, but instead asks the user to chose the site they want to install from. Workflows 2/3 are an update - in this case the user isn't prompted to chose a site, and the update site listed in the feature.xml is the only site contact. So, if the user picks a site in workflow 1 that is different from the update URL used in 2/3, then you'll get a different result.
Comment 6 Zhongyu Zhang CLA 2009-02-04 17:44:20 EST
Thanks for your explanation. In our case, we only use the URL in the feature.xml file. If it works in install operation (workflow 1), it should work in update operation too (workflow 2 and 3), right?

When I load this URL in a web browser, i can see 3 entries:
  site.xml
  features/
  plugins/
where features and plugins are folders that contains those jars. This directory structure is correct, isn't it? Did I miss something else?