Community
Participate
Working Groups
in 3.5.2 and Helios if you have a .product whose ID is the same as that of a plugin in that product (e.g., both are org.eclipsercp.hyperbola) then exporting the product from PDE UI silently fails. The output dir has plugins and a p2 dir but no executables and some other files are missing. Note that htis only happens if the Generate Metadata Repository option is used. I suspect the problem is that the product and bundle p2 IU IDs collide and that confuses the director. At the very least the export should not silently fail (note it may not actually be "failing" rather, just not doing what was expected). Even better, there should be some sort of check regarding the IDs or the product IU ID should be suffixed with something under the covers (ala how features are).
*** Bug 341950 has been marked as a duplicate of this bug. ***
Can we get this looked at as part of the polish work for 3.7? Even just a warning/error in the product editor would be a start and help the user.
I added this bug for consideration to the 3.7 Polish wiki (http://wiki.eclipse.org/Polish3.7).
Consider for M7 or RC1
Created attachment 194544 [details] Patch Curtis, plz review the patch. The warning message might need rewording.
+1 Fixed in HEAD. I did change the warning to the following, let me know if there are any problems with it: The product ID should not match the defining plug-in's ID. This product will not export correctly.
Note that the product id should not match the id of ANY bundle. (really any IU but most people will not have random IUs hanging around). Comment 0 could have been clearer on that but...
(In reply to comment #7) > Note that the product id should not match the id of ANY bundle. (really any IU > but most people will not have random IUs hanging around). Comment 0 could have > been clearer on that but... Does the export fail when it matches any ID? I believe Ankur had trouble reproducing until he matched the defining plug-in's ID.
The export might succeed but the resultant repo will either have two IU (one for the product and one for the bundle) or (if the versions are the same) there may be only one. try exporting a product that has in it another bundle with the same id as the product. Taht is, put the .product file for "bar" in budnle "foo" but also have a "bar" bundle as part of the product. that should cause the problem too.
Ankur, do you think we should reopen this and expand it for 3.7 or open a new bug to improve it in 3.8?
We can not fix it all in 3.7. I will see if a smaller patch can issue the warning after checking for all the plug-ins. Work better done in 3.8 would be to investigate what happens when 1. the ID matches that of a feature 2. the product config is feature based and then a product Id matches with some plug-in 3. these problem exists and the product is build headlessly. However, the best way to fix it will be to successfully build the repo even when the IDs match.
The current fix is a step ahead for sure. There should however be something left open for 3.8 consideration. Some notes on your points in comment #11 > 1. the ID matches that of a feature This will not happen as the IUs representing features are published with .feature.group appended to the feature id. Basically for the same reason, the feature and bundle namespaces are distinct but in p2 there is no way to capture that. > 2. the product config is feature based and then a product Id matches with some > plug-in Yup > 3. these problem exists and the product is build headlessly. Yup. The point of having the editor flag it is so that people cannot author a product definition that has the problem. This would largely avoid the problem. > However, the best way to fix it will be to successfully build the repo even > when the IDs match. The IU id must be unique. In theory an approach similar to that taken with features could be used. For example publishing products with some suffix (eg .product). Would have to talk to the p2 team to see what impact if any that would have.
Verified in I20110512-2000 Opened Bug 345996 for tracking remaining work in 3.8