Community
Participate
Working Groups
We are seeing quite a few bug reports in Fedora regarding plugins not getting picked up from dropins. I finally have a reproducible test case. It's a bit involved but it boils down to: ChangeLog + CDT in dropins => everything as expected ChangeLog in dropins => everything as expected nothing in dropins => everything as expected CDT in dropins => everything as expected ChangeLog in dropins => everything as expected (cdt.ui remains in profile) ChangeLog + CDT in dropins => cdt.ui NOT in bundles.info (due to being in profile) Things to note: - ChangeLog + CDT in same directory under dropins causes no failure - CDT alone causes no failure - ChangeLog and CDT install with p2 UI fine Detailed steps (sorry for the number of steps): - explode SDK build (I used M20081015-0800-linux-gtk-x86_64) and ensure it is read-only and not owned by the user running it: sudo mkdir /opt/eclipse-readonly cd /opt/eclipse-readonly sudo tar zxf ~/eclipse-SDK-M20081015-0800-linux-gtk-x86_64.tar.gz sudo chmod -R og-w /opt/eclipse-readonly sudo chown -R root:root /opt/eclipse-readonly - clear out ~/.eclipse (or whatever it is on Windows): mv ~/.eclipse{,.bak20081016} - start eclipse: /opt/eclipse-readonly/eclipse/eclipse -data /tmp/testDropins - close eclipse - take CDT stuff and Linux Tools ChangeLog plugin and put their expanded contents into dropins: cd /tmp wget http://overholt.ca/eclipse/cdt.tar.bz2 wget http://overholt.ca/eclipse/changelog.tar.bz2 sudo tar jxf cdt.tar.bz2 sudo tar jxf changelog.tar.bz2 cd /opt/eclipse-readonly/eclipse/dropins sudo cp -rp /tmp/cdt . sudo cp -rp /tmp/changelog . - start eclipse /opt/eclipse-readonly/eclipse/eclipse -data /tmp/testDropins Switch to C/C++ perspective to verify that it works - close eclipse - remove CDT stuff from dropins sudo rm -rf /opt/eclipse-readonly/eclipse/dropins/cdt - re-start eclipse, noting that C/C++ perspective has no icon /opt/eclipse-readonly/eclipse/eclipse -data /tmp/testDropins - close eclipse - remove ChangeLog stuff from dropins sudo rm -rf /opt/eclipse-readonly/eclipse/dropins/changelog - re-start eclipse (nothing in dropins now) /opt/eclipse-readonly/eclipse/eclipse -data /tmp/testDropins - close eclipse - re-copy CDT stuff into dropins sudo cp -rp /tmp/cdt /opt/eclipse-readonly/eclipse/dropins - re-start eclipse noting that C/C++ perspective *has* an icon /opt/eclipse-readonly/eclipse/eclipse -data /tmp/testDropins - close eclipse - remove CDT stuff and re-copy ChangeLog stuff sudo rm -rf /opt/eclipse-readonly/eclipse/dropins/cdt sudo cp -rp /tmp/changelog /opt/eclipse-readonly/eclipse/dropins - re-start eclipse noting that C/C++ perspective has no icon /opt/eclipse-readonly/eclipse/eclipse -data /tmp/testDropins - close eclipse - note that cdt.ui remains in the profile even though it's not in dropins. This will prevent its re-installation from dropins. - re-copy CDT stuff, leaving both ChangeLog and CDT in dropins sudo cp -rp /tmp/cdt /opt/eclipse-readonly/eclipse/dropins - re-start eclipse, expecting C/C++ pespective icon to be present /opt/eclipse-readonly/eclipse/eclipse -data /tmp/testDropins C/C++ perspective icon is not available due to cdt.ui not being in bundles.info because it was still listed as being in the profile. P.S. Yes, I'm hoping to win the most difficult to reproduce award ;)
Andrew, was thinking about this last night and I remembered bug 232094. It is a similar situation so it might be a duplicate. Yesterday I didn't draw the connection because I didn't realize you were deleting whole directories from the dropins folder in the file-system. We treat different dirs as extensions... that is why we were seeing the ExtensionLocationMetadataRepository when we were debugging yesterday.
Okay, I have a simpler set of steps to reproduce (see comment #1 for context). It's basically CDT + ChangeLog; just ChangeLog; CDT + ChangeLog. - put both cdt and changelog into clean read-only SDK dropins/ - rm -rf ~/.eclipse - start read-only eclipse; switch to C/C++ perspective and note icon - close eclipse - sudo rm -rf read-only SDK dropins/cdt - start read-only eclipse; note missing C/C++ perspective icon - close eclipse - look for "unit id='org.eclipse.cdt.ui" in the latest profile file in ~/.eclipse (I used [1]) - sudo cp -rp cdt read-only SDK dropins/ - start read-only eclipse; note missing C/C++ perspective icon [1] pushd ~/.eclipse/org.eclipse.platform_3.4.0_1752063435/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile grep "unit id='org.eclipse.cdt.ui" $(ls | sort | tail -n 1) popd Perhaps I should also note that the binary plugins are all built from EPL'd sources from eclipse.org.
Hi DJ, (In reply to comment #1) > Andrew, was thinking about this last night and I remembered bug 232094. It is a > similar situation so it might be a duplicate. Do you have a patch for that? I can try getting one from CVS based on dates and your work-in-progress patch if not.
Andrew, what is the directory structure you have under the dropins folder? I just tried a simple case to reproduce the problem on the latest 3.4.2 build but it worked ok.
Also, what is changelog?
(In reply to comment #5) > Also, what is changelog? It's part of the Linux distros project. It's got an editor and some tools for managing ChangeLog files (common in Free software projects). (In reply to comment #4) > Andrew, what is the directory structure you have under the dropins folder? $ ls -R /opt/eclipse-readonly/eclipse/dropins/ /opt/eclipse-readonly/eclipse/dropins/: cdt changelog /opt/eclipse-readonly/eclipse/dropins/cdt: epl-v10.html features notice.html plugins /opt/eclipse-readonly/eclipse/dropins/cdt/features: org.eclipse.cdt_5.0.0.200806171202 org.eclipse.cdt.gnu.build_5.0.0.200806171202 org.eclipse.cdt.platform_5.0.0.200806171202 org.eclipse.cdt.debug.gdbjtag_5.0.0.200806171202 org.eclipse.cdt.gnu.debug_5.0.0.200806171202 org.eclipse.cdt.util_5.0.0.200806171202 /opt/eclipse-readonly/eclipse/dropins/cdt/features/org.eclipse.cdt_5.0.0.200806171202: eclipse_update_120.jpg epl-v10.html feature.properties feature.xml license.html META-INF /opt/eclipse-readonly/eclipse/dropins/cdt/features/org.eclipse.cdt_5.0.0.200806171202/META-INF: MANIFEST.MF /opt/eclipse-readonly/eclipse/dropins/cdt/features/org.eclipse.cdt.debug.gdbjtag_5.0.0.200806171202: eclipse_update_120.jpg epl-v10.html feature.properties feature.xml license.html META-INF /opt/eclipse-readonly/eclipse/dropins/cdt/features/org.eclipse.cdt.debug.gdbjtag_5.0.0.200806171202/META-INF: MANIFEST.MF /opt/eclipse-readonly/eclipse/dropins/cdt/features/org.eclipse.cdt.gnu.build_5.0.0.200806171202: eclipse_update_120.jpg epl-v10.html feature.properties feature.xml license.html META-INF /opt/eclipse-readonly/eclipse/dropins/cdt/features/org.eclipse.cdt.gnu.build_5.0.0.200806171202/META-INF: MANIFEST.MF /opt/eclipse-readonly/eclipse/dropins/cdt/features/org.eclipse.cdt.gnu.debug_5.0.0.200806171202: eclipse_update_120.jpg epl-v10.html feature.properties feature.xml license.html META-INF /opt/eclipse-readonly/eclipse/dropins/cdt/features/org.eclipse.cdt.gnu.debug_5.0.0.200806171202/META-INF: MANIFEST.MF /opt/eclipse-readonly/eclipse/dropins/cdt/features/org.eclipse.cdt.platform_5.0.0.200806171202: eclipse_update_120.jpg epl-v10.html feature.properties feature.xml license.html META-INF /opt/eclipse-readonly/eclipse/dropins/cdt/features/org.eclipse.cdt.platform_5.0.0.200806171202/META-INF: MANIFEST.MF /opt/eclipse-readonly/eclipse/dropins/cdt/features/org.eclipse.cdt.util_5.0.0.200806171202: eclipse_update_120.jpg epl-v10.html feature.properties feature.xml license.html META-INF /opt/eclipse-readonly/eclipse/dropins/cdt/features/org.eclipse.cdt.util_5.0.0.200806171202/META-INF: MANIFEST.MF /opt/eclipse-readonly/eclipse/dropins/cdt/plugins: org.eclipse.cdt_5.0.0.200806171202.jar org.eclipse.cdt.debug.ui_5.0.0.200806171202.jar org.eclipse.cdt.core_5.0.0.200806171202.jar org.eclipse.cdt.doc.user_5.0.0.200806171202.jar org.eclipse.cdt.core.linux_5.0.0.200806171202.jar org.eclipse.cdt.launch_5.0.0.200806171202.jar org.eclipse.cdt.core.linux.x86_64_5.0.0.200806171202.jar org.eclipse.cdt.make.core_5.0.0.200806171202.jar org.eclipse.cdt.debug.core_5.0.0.200806171202.jar org.eclipse.cdt.make.ui_5.0.0.200806171202.jar org.eclipse.cdt.debug.gdbjtag_4.0.0.200806171202.jar org.eclipse.cdt.managedbuilder.core_5.0.0.200806171202.jar org.eclipse.cdt.debug.gdbjtag.core_4.0.0.200806171202.jar org.eclipse.cdt.managedbuilder.gnu.ui_5.0.0.200806171202.jar org.eclipse.cdt.debug.gdbjtag.ui_4.0.0.200806171202.jar org.eclipse.cdt.managedbuilder.ui_5.0.0.200806171202.jar org.eclipse.cdt.debug.mi.core_5.0.0.200806171202.jar org.eclipse.cdt.ui_5.0.0.200806171202.jar org.eclipse.cdt.debug.mi.ui_5.0.0.200806171202.jar org.eclipse.cdt.util_5.0.0.200806171202.jar /opt/eclipse-readonly/eclipse/dropins/changelog: features plugins /opt/eclipse-readonly/eclipse/dropins/changelog/features: org.eclipse.linuxtools.changelog_2.6.1 /opt/eclipse-readonly/eclipse/dropins/changelog/features/org.eclipse.linuxtools.changelog_2.6.1: epl-v10.html feature.xml /opt/eclipse-readonly/eclipse/dropins/changelog/plugins: org.eclipse.linuxtools.changelog.core_2.6.1.jar org.eclipse.linuxtools.changelog.doc_2.6.1 org.eclipse.linuxtools.changelog.cparser_2.6.1.jar org.eclipse.linuxtools.changelog.parsers.java_2.6.1.jar /opt/eclipse-readonly/eclipse/dropins/changelog/plugins/org.eclipse.linuxtools.changelog.doc_2.6.1: doc.zip plugin.properties plugin.xml toc.xml
Andrew, I can't seem to reproduce the problem. Here are my steps, note that I am not using changelog. Does it have a dependency on CDT? - install latest Eclipse 3.4.2 build into /opt/eclipse as root - put cdt into /opt/eclipse/dropins/cdt - rm -rf ~/.eclipse - as user, start /opt/eclipse/eclipse - close eclipse - as root rm -rf /opt/eclipse/dropins/cdt - as user start eclipse - stop eclipse - check latest profile and grep for "cdt"... find nothing - as root put cdt into /opt/eclipse/dropins/cdt - as user start eclipse - note that the CDT functionality is available I am using build eclipse-SDK-M20081015-0800-linux-gtk. Are you able to reproduce the problem using my steps? Do you see anything that is missing? Am I able to get the changelog bundle and see if it affects my scenario?
(In reply to comment #7) > Andrew, I can't seem to reproduce the problem. Here are my steps, note that I > am not using changelog. Does it have a dependency on CDT? I can't reproduce with just CDT. You need ChangeLog, too. > Are you able to reproduce the problem using my steps? Do you see anything that > is missing? Am I able to get the changelog bundle and see if it affects my > scenario? You can get it via the wget statement in comment #1. Or build it yourself from eclipse.org technology SVN. It's all EPL'd code.
Am able to reproduce the problem with both bundles installed. Will investigate.
Not sure if it is good news or bad news, but the same thing happens in a single user install on linux. At least it makes it easier to debug...
I checked the metadata being generated and noticed that there is a dependency from the linuxtools to CDT and it turns out that one of the bundles has an optional dependency on CDT. I'm not sure why the CDT IUs remain in the profile but will come up with a simple test case for this problem.
(In reply to comment #11) > I checked the metadata being generated and noticed that there is a dependency > from the linuxtools to CDT and it turns out that one of the bundles has an > optional dependency on CDT. I'm not sure why the CDT IUs remain in the profile > but will come up with a simple test case for this problem. > What happened with the test case ? I will try to help if you managed to produce a simple test case I can use for debuging/testing purposes.
The simple test case wasn't quite right and didn't reproduce the problem. I haven't had a chance to look at it lately but will try and find time.
We won't have the time to look into this.
This is *killing* us in the Linux distributions. How can we help fix this?
Putting together a smaller test case would be a good start. Something that makes it a bit easier to debug. I was looking at creating individual bundles and features with optional dependencies, etc trying to mirror what was done in your example but on a smaller scale.
Created attachment 128051 [details] test workspace I just tested the following scenario with a 3.5 build (I20090202) and everything seems to work. Are my steps below sane? Is this different than the RPM case, anyone (on CC)? 1. - extract Eclipse SDK into read-only location sudo mkdir /usr/local/eclipse cd /usr/local/eclipse sudo tar zxf eclipse-SDK-I20090202-1012-linux-gtk-x86_64.tar.gz 2. - put EMF [1] + CDT [2] + Linux Tools [3] into dropins/{emf,cdt,linuxtools} of above sudo unzip -q -d eclipse/dropins/emf ~/emf-xsd-SDK-2.5.0M4.zip sudo unzip -q -d eclipse/dropins/cdt ~/cdt-master-6.0.0-I200903051334.zip sudo unzip -q -d eclipse/dropins/linuxtools ~/linuxtools-Master-incubation-N200903071802.zip 3. - start Eclipse with a workspace with a CDT project and a few EMF projects (zip of my workspace attached to this bug and also at [5]) - if EMF is found, the org.eclipse.* projects should compile fine - if Linux Tools and CDT are found, putting cursor in testC.c's main method and pressing Ctrl-Alt-c should open the ChangeLog file with a new entry. You should also be able to right-click->Run local C/C++ application. - close Eclipse 4. - upgrade EMF (zip at [6]) sudo rm -rf eclipse/dropins/emf; sudo unzip -q -d eclipse/dropins/emf ~/emf-xsd-SDK-2.5.0M5.zip - start Eclipse with same workspace as above - if EMF is still found, the org.eclipse.* projects should compile fine - if Linux Tools and CDT are still found, putting cursor in testC.c's main method and pressing Ctrl-Alt-c should open the ChangeLog file with a new entry. You should also be able to right-click->Run local C/C++ application. - close Eclipse 5. - upgrade CDT (zip at [7]) sudo rm -rf eclipse/dropins/cdt; sudo unzip -q -d eclipse/dropins/cdt ~/cdt-master-6.0.0-I200903060602.zip - start Eclipse with same workspace as above - if EMF is still found, the org.eclipse.* projects should compile fine - if Linux Tools and CDT are still found, putting cursor in testC.c's main method and pressing Ctrl-Alt-c should open the ChangeLog file with a new entry. You should also be able to right-click->Run local C/C++ application. - close Eclipse 6. - upgrade Linux Tools (zip at [8]) sudo rm -rf eclipse/dropins/linuxtools; sudo unzip -q -d eclipse/dropins/linuxtools ~/linuxtools-Master-incubation-N200903080003.zip - start Eclipse with same workspace as above - if EMF is still found, the org.eclipse.* projects should compile fine - if Linux Tools and CDT are still found, putting cursor in testC.c's main method and pressing Ctrl-Alt-c should open the ChangeLog file with a new entry. You should also be able to right-click->Run local C/C++ application. - close Eclipse I also tried reversing 5. and 6. (ie. upgrade Linux Tools before CDT). This worked. Doing an upgrade on both the CDT and Linux Tools at the same time also worked. The stuff in dropins doesn't show up under the "Installation information" thing but I'll file a separate bug about that. [1] http://www.cs.rit.edu/mirrors/eclipse/modeling/emf/emf/downloads/drops/2.5.0/S200812151800/emf-xsd-SDK-2.5.0M4.zip [2] http://download.eclipse.org/tools/cdt/builds/6.0.0/I.I200903051334/cdt-master-6.0.0-I200903051334.zip [3] https://build.eclipse.org/hudson/job/cbi-linuxtools-0.2.x-Galileo-nightly/43/artifact/build/N200903071802/linuxtools-Master-incubation-N200903071802.zip [4] nothing here (I re-numbered my footnotes ;) [5] http://overholt.fedorapeople.org/dropinstestworkspace.zip [6] http://www.cs.rit.edu/mirrors/eclipse/modeling/emf/emf/downloads/drops/2.5.0/S200902031500/emf-xsd-SDK-2.5.0M5.zip [7] http://download.eclipse.org/tools/cdt/builds/6.0.0/I.I200903060602/cdt-master-6.0.0-I200903060602.zip [8] https://build.eclipse.org/hudson/job/cbi-linuxtools-0.2.x-Galileo-nightly/lastSuccessfulBuild/artifact/build/N200903080003/linuxtools-Master-incubation-N200903080003.zip
I confirm this is still an issue in Eclipse Juno (3.8/4.2)
Ok, here is the explanation of the issue: * One changelog plugin depends on cdt.ui. That's a bug in changelog and it will be fixed (it should either not depend, or specify cdt on its require list). * Uninstalling cdt and installing changelog in separate reconciler sessions works fine. * Uninstalling cdt and installing changelog in one session causes: [p2] Mon May 21 13:07:14 CEST 2012 - [Start Level Event Dispatcher] [reconciler] [plan] Some units will not be uninstalled: [p2] Mon May 21 13:07:14 CEST 2012 - [Start Level Event Dispatcher] [reconciler] [plan] org.eclipse.cdt.ui 5.4.0.201203191015 [p2] Mon May 21 13:07:14 CEST 2012 - [Start Level Event Dispatcher] [reconciler] [plan] org.eclipse.cdt.core 5.4.0.201203191015 Which means that changelog being installed and included into the plan blocks uninstallation of cdt. Which is wrong, because cdt is no longer present in dropins.
Created attachment 215949 [details] Unit test
Created attachment 215950 [details] mylyn/context/zip
Created attachment 215951 [details] binary plugin for tests to be placed in testData/reconciler/installuninstall
Created attachment 215952 [details] The second binary plugin for tests to be placed in testData/reconciler/installuninstall
Created attachment 216007 [details] Correct jar for tests.
Created attachment 216008 [details] Correct jar for tests
Created attachment 216012 [details] Patch proposition Ok, I have a patch, which also fixes the testcase attached to the bug, but also breaks all other reconciler tests - no idea why.
Created attachment 216013 [details] mylyn/context/zip
Created attachment 216101 [details] Another fix proposition (all tests pass)
Any chance to get this fix released early into Kepler? It works fine for Fedora, has proper tests and does not cause any regressions. Releasing it now could save some time (as there is still plenty of time to revert the change if it somehow had caused any problems).
I will look into it.
Patch released.
Thanks!