| Summary: | [publisher] Redundant 'feature.jars' entry on "Review license" page | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Thomas Hallgren <thomas> | ||||||||||||
| Component: | p2 | Assignee: | Pascal Rapicault <pascal> | ||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||
| Severity: | normal | ||||||||||||||
| Priority: | P3 | CC: | dj.houghton, irbull, john.arthorne, matthew, pascal, simon_kaegi | ||||||||||||
| Version: | 3.5 | Flags: | pascal:
review+
|
||||||||||||
| Target Milestone: | 3.5 RC1 | ||||||||||||||
| Hardware: | All | ||||||||||||||
| OS: | All | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Bug Depends on: | |||||||||||||||
| Bug Blocks: | 274654 | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Thomas Hallgren
Created attachment 134117 [details]
Patch that removes the redundancy
This patch removes the generation of the license and copyright info in the features.jar.
The bug manifests itself in the Galileo Capabilities feature since the publisher is used when that feature is generated into an interim repository during build. Thomas, Should the properties (license) be set on the feature jar or the feature group? Simon was moving things to the feature jar (I think). Isn't the jar file of an old relic that we want to get rid of? Seems to me the meta-data should be enough and that the jar file doesn't bring anything useful into the equation. If we're moving in that direction (which I though we were), then surely, we need to keep all meta-data in the group, not in the IU that represents the jar artifact. Sorry, it was DJ that moved things to the feature jar instead of the feature group. (Bug 273626). DJ should the license be set on the feature jar or the feature group? Once we have this sorted out, I think we should put together a regression test with this patch. I think the regression test can be written regardless of the decision. It should use the same logic as the UI "Review licenses" page and assert that only one entry show up. I can put something together. Created attachment 134178 [details]
Patch for the FeaturesActionTest
The patch adds assertions that at exactly one license and copyright has been generated. It doesn't currently care what IU it ended up in.
(In reply to comment #5) > DJ should the license be set on the feature jar or the feature group? > Another fact that speaks for having the license and copyright in the feature.group IU is that the feature.jar IU shows up untranslated on the 'Review license' page. Not sure if that's a bug or if it's just not intended to be displayed that way. (In reply to comment #5) > Sorry, it was DJ that moved things to the feature jar instead of the feature > group. (Bug 273626). DJ should the license be set on the feature jar or the > feature group? > When you pointed out that the license info and other things were already on the group, I backed out of that part of the patch. Check out the diff between FeaturesAction 1.45 and 1.46, I only added the update manager properties to aid with feature installation related to branding. It looks like the license info was put in both places in the old code (MetadataGeneratorHelper #createFeatureJarIU and #createGroupIU). I'm not sure which is right. Going forward every IU (plug-in, feature, exe, etc.) should have a license and a copyright (bug #255075). The presentation is unfortunate however removing the license from the jar IU is a band aid aiming in the wrong direction. The real fix should be to change the UI (see bug 217944 which implies fixing bug 212218) *** Bug 267919 has been marked as a duplicate of this bug. *** For what it's worth, I had 3.4.0 loaded today, and noticed that this is actually a regression from 3.4. We didn't show the licenses separately for the feature JARs in 3.4. Looking at the UI code, I see we had a workaround in there that we omitted showing duplicates that have the same name. I think the bug here is that we are not setting the name property on the feature jar IU's. From AcceptLicensesWizardPage: // Current metadata generation can result with a feature group IU and the feature jar IU // having the same name and license. We will weed out duplicates if the license and name are both // the same. Created attachment 134456 [details]
Fix
Comparing MetadataGeneratorHelper.createFeatureJarIU to FeatureAction.createFeatureJARIU, I noticed the publisher is simply missing several of the properties that we were setting in 3.4 (name, description, provider). If we set the name property then the "duplicate entries" problem should go away.
As I mentioned on Bug 273626, these are all set on the feature.group. Does everything need to be duplicated on both the jar and the group? What about translation? (I don't think we create a translation fragment for the jar, so these properties likely won't be translated). > Does everything need to be duplicated on both the jar and the group?
Yes, things like the name and description should always be set, otherwise they won't show up correctly for end users in the UI.
Created attachment 134476 [details]
New patch adding translation
Patch reviewed and released. I think we should add some feature.jar translation tests then. i opened bug 275040 to track. Feel free to push it on me. Created attachment 134493 [details]
Regression test in publisher tests
I have also released the regression test to HEAD. |