| Summary: | [publisher] PDE Updatesite Build all generates wrong categories | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | ekkehard gentz <ekke> |
| Component: | p2 | Assignee: | Ian Bull <irbull> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | aniefer, bugs.eclipse.org, johan.wannheden, john.arthorne, joostvanpinxten, nbaccount, pascal |
| Version: | 3.6 | ||
| Target Milestone: | 3.6 M7 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Attachments: | |||
|
Description
ekkehard gentz
Created attachment 165235 [details]
screenshot: the empty update site project - only site.xml is there
Created attachment 165236 [details]
screenshot: site project after sync all features and build all
Created attachment 165237 [details]
screenshot: all exported into filesystem in new directory
Created attachment 165238 [details]
screenshot: added site into fresh SDK M6 installation
Created attachment 165239 [details]
screenshot: install new software - wrong categories
Created attachment 165240 [details]
screenshot: without P2 metadata categories are ok
Moving to Ian since he usually takes care of category generations. Problem seems to be UpdateSite#load, it keeps a cache of the sites based on location and makes no attempt to check if the cache is up to date. In this case, when generating categories a second time after changing the site.xml, the cache just returns the original site The cached site object does have a checksum on it that we could conceivably check against the checksum of the file we are supposed to load, but I'm not sure that recalculating a checksum is any cheaper than just always reloading the file. The checksums are used by the UpdateSite repositories that are used for backwards compatibility with site.xml repositories. (In reply to comment #8) > Problem seems to be UpdateSite#load, it keeps a cache of the sites based on > location and makes no attempt to check if the cache is up to date. > Good find Andrew, Seems like a dup of bug 244060 (In reply to comment #8) > Problem seems to be UpdateSite#load, it keeps a cache of the sites based on > location and makes no attempt to check if the cache is up to date. > > In this case, when generating categories a second time after changing the > site.xml, the cache just returns the original site > yes - exactly what happened great - that you found the reason ekke Created attachment 165823 [details] Proposed patch This patch doesn't cache file: URIs, and also changes the cache to use SoftReferences. It doesn't fully address bug 244060, but it does fix building categories from the UI. Created attachment 165825 [details]
Patch v2
Patch v2, remove the SoftReference from the cache if it has been cleared.
I have released this patch. Update site building is working for me now. (In reply to comment #13) > I have released this patch. Update site building is working for me now. great news :) so this should work with the next N-Build or I-Build ? ekke The change is tagged v20100422, should be in the M7 warmup I20100423-0906 whenever it finishes (In reply to comment #15) > The change is tagged v20100422, should be in the M7 warmup I20100423-0906 > whenever it finishes great ! I also have to wait for this I-Build, because of another bug where I got a stack overflow while installing software using I20100422 ;-) (In reply to comment #15) > The change is tagged v20100422, should be in the M7 warmup I20100423-0906 > whenever it finishes just tested: OSX10.6.3, cocoa64 Helios SDKM6 + I-Build 20100423-0906 did some test with an update site: sync, build-all, exported to filesystem tested from other installation - also SDKM6 + I-Build 20100423-0906 the Categories were wrong: only 2 of 3 displayed and not all features below the categories generated again tested again in a fresh installation this time only 1 Category and not all features of this category visible ekke (In reply to comment #17) I released a few changes yesterday for category publishing, but they were released around 23:59 EST and were not part of the I20100423-0906. I'm just posting this here so we can rule that out as a possible cause. The fact that you are not getting the correct categories with a fresh install (and thus a restart) is a little worrisome. In the past the problem was due to cached update sites, but if this is happening the first time you build and sync then there might be a regression here. Can you post your site.xml file (or is it the same one that's in attachment 1 [details])? (In reply to comment #18) > (In reply to comment #17) > I released a few changes yesterday for category publishing, but they were > released around 23:59 EST and were not part of the I20100423-0906. > > I'm just posting this here so we can rule that out as a possible cause. > > The fact that you are not getting the correct categories with a fresh install > (and thus a restart) is a little worrisome. In the past the problem was due to > cached update sites, but if this is happening the first time you build and sync > then there might be a regression here. > > Can you post your site.xml file (or is it the same one that's in attachment 1 [details])? Ian, I did the tests in fresh installations, but the generation always from the same, so it could be that there were generations before. think I wait for the next build (N-build or I-build ?) to test again and I also can do a test in a fresh install ekke Has this really been resolved? It seems to me that building update sites with Kepler (4.3.0) is still affected with this bug... If this has been resolved, it's probably a regression now? That is, categories are hidden, unless the P2 meta-information is deleted manually. (In reply to Joost van Pinxten from comment #20) > Has this really been resolved? It seems to me that building update sites > with Kepler (4.3.0) is still affected with this bug... If this has been > resolved, it's probably a regression now? > > That is, categories are hidden, unless the P2 meta-information is deleted > manually. To be more specific, this occurs when you are creating an empty project through the New-Wizard ("Feature Project" and "Update Site Project"). Additionaly: this problem does not seem to occur when using the Exporting wizard (as "Deployable feature") with a (wizard-)configured category. Maybe this is a regression but this bug still seems to be alive and well in the Mars Release (4.5.0 20150621-1200). |