Community
Participate
Working Groups
I create a *.link file in my dropins / links directory which has a path to another eclipse config which has a single additional feature installed(using the mechanism suggested by Michael Scharf: http://michaelscharf.blogspot.com/2009/02/p2-how-i-install-plugins-in-extension.html). However if I change the .link file (e.g. by deleting the path=... string) on reloading the IDE, the features are still installed. If I start with the link invalid, and update the path=... link to be valid this is correctly picked up. If I delete the .link file the installed feature correctly disappear. In some instances it looks like p2 doesn't notice changes to a .link file. Steps to reproduce: 1 Create an eclipse configuration with some features: /path/to/features/eclipse/config 2 touch /home/jamesb/.eclipse/3.5-ccrc2/eclipse/.eclipseextension 3 From a different config create a broken link file: /path/to/features2/eclipse/dropins/features.link => #path=/path/to/features/ 4 Run eclipse with the new configuration and verify that the features aren't picked up. 5 Fix the link: (Remove the leading #) 6 restart the eclipse session and verify that the features are installed 7 corrupt the link path and restart => feature still installed 8 delete the link file and restart => feature removed (as expected)
Only directory timestamps are currently watched when checking whether the reconcile cache is up-to-date, that's why changes to a link file won't be noticed. The code is in org.eclipse.equinox.p2.reconciler.dropins/Activator.java#isUpToDate() if anybody wants to try a patch. From my point of view, also checking the timestamps of files shouldn't be any more difficult and shouldn't impose a performance hit sine the directory block needs to be read from disk anyways.
This might be a dup of bug 269297.
(In reply to comment #2) > This might be a dup of bug 269297. Looks like it, however your comment there states: > Note that this works ok if the link file is in the /links folder but not when > it is a child in the dropins. The ProfileSynchronizer#isUpToDate check is > returning true and we aren't detecting the changes. > > So the work-around for your specific problems would be: > - move your link file to the links/ folder Isn't the links folder was deprecated in place of dropins...: http://wiki.eclipse.org/Equinox_p2_Getting_Started#Links_Folder > - or specify the osgi.checkConfiguration=true System property which always does > a check. (expect slower startup times) I don't want this either. I promise not to change the contents of my centrally installed features. I only want the reconciler to run when the link itself has changed, not on every startup. (This could be as simple as checking mtime -- I'm not that fussy :)). As it happens I already use the workaround of use a different link file, so I'm reasonably happy.
*** Bug 310654 has been marked as a duplicate of this bug. ***
As part of the fix for bug 269297 I released code which opens the link file and caches the timestamp of the folders that it points to. This is the part which existed in the links/ folder support before but not the dropins/ folder... the old code only used to do a shallow caching. *** This bug has been marked as a duplicate of bug 269297 ***