Community
Participate
Working Groups
Cloned to track progress of backporting this fix to the 3.4.x maintenance branch. +++ This bug was initially created as a clone of Bug #247638 +++ Currently whenever I try to install a new feature I get the following error in the Install dialog shown when an error is detected (picture attached). Format error in file: C:\Users\Tonny\AppData\Local\Temp\p2Encoding49788.opb. The problem seems to be related to the code in org.eclipse.equinox.internal.p2.director.Projector, but... this code is nearly impossible to debug :-(
Pascal, did you mean to close this? Did you release code to fix this in the 3.4.x stream? Re-opening. Please close again if you did make the necessary code changes or if the changes are a part of a fix for another bug which was already released. Thanks.
I thought we had addressed this and forgot to release it, but I did not pay attention to the date at which it had been opened.
Created attachment 162317 [details] 3.4_P2director_with_DependencyHelper Usage of DependencyHelper added to p2.director.Projector class. We need to use higher version of SAT4J, version 2.0.3 does not include DependencyHelper. I added the latest version 2.2.0 to the manifest.
Natalia can you describe this patch? Did you copy the entire projector code from 3.6 stream, or is this a customized port of the 3.4.x code to use DependencyHelper? If copied from 3.6, what version is it based on - 3.6 M6, or something older?
(In reply to comment #4) > Natalia can you describe this patch? Did you copy the entire projector code > from 3.6 stream, or is this a customized port of the 3.4.x code to use > DependencyHelper? If copied from 3.6, what version is it based on - 3.6 M6, or > something older? I've tried to create patch with the smallest change needed to introduce DependencyHelper. It is based on Projector revision 1.24.2.17, but I use RequiredCapability instead of IRequiredCapability. Besides changes in Projector class I added Explanation class from 3_5 stream (replacing IRequiredCpability with RequiredCapability) and few messages to Messages class and messages.properties.
This is insane.
(In reply to comment #6) > This is insane. Pascal, Is my approach totally incorrect? Could you give any hint how DependencyHelper should be backported to 3_4 stream?
Not to derail this bugzilla, but, Pascal/DJ/Anyone, I tried dropping the org.eclipse.equinox.internal.p2.director into the dropins/ folder of an unzipped eclipse classic but it does not get picked up. Why does that happen? Is there any way via dropins to get this plugin loaded?
The problem is that you are backporting some code that has some fundamental behavioural changes and putting in production something that has not even been used into a final release and put this back into a maintenance release.
(In reply to comment #8) > Not to derail this bugzilla, but, Pascal/DJ/Anyone, I tried dropping the > org.eclipse.equinox.internal.p2.director into the dropins/ folder of an > unzipped eclipse classic but it does not get picked up. Why does that happen? > Is there any way via dropins to get this plugin loaded? You need to create a feature patch for org.eclipse.equinox.p2.user.ui that includes org.eclipse.equinox.internal.p2.director. This works for me with dropins directory.
Created attachment 162649 [details] p2.director feature patch Here is an example feature patch with sat4j 2.2.0 and p2.director with DependencyHelper.
Created attachment 162851 [details] 3.4_P2director_with_DependencyHelper (improved) I've prepared improved version of patch. I added code to optimization function to put more weights on the installation of optional packages, as it is done in 3.5 - based on Daniel's comment: https://bugs.eclipse.org/bugs/show_bug.cgi?id=301446#c23 Test case Bug302582d passes with this patch and solver's timeout on conflicts increased from 1000 to 3000 (initially bug 301446).
Created attachment 162996 [details] patch Updated patch. This patch keeps the current code path by default. (although it does use the new version of SAT4J) If the user sets the eclipse.p2.newProjector System property to true then we will use the projector class included in the previous patch.
Created attachment 163040 [details] patch Updated patch.
Committed latest patch to 3.4.x maintenance branch. Also updated Orbit map file to fetch the new version of SAT4J.
Comment on attachment 162851 [details] 3.4_P2director_with_DependencyHelper (improved) Marking for iplog. This patch was incorporated into the patch that DJ eventually released.