[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Installing plug-ins from a local folder

Thanks Paul. The way we organize bundle our application is through features and plugins. We have the version of both the feature and the plugins promoted to a higher number for both service pack and major releases (standard eclipse version naming conventions). The feature lists the plugins. I guess I would have to go with your advice on
"If you manually customize your eclispe installation in this manner you are accepting responsibility over this part of the system and must likewise uninstall it manually too.  "

Thanks again,

2009/3/2 <Warren_Paul@xxxxxxx>
Hi Ravi,
I am not a p2 committer but I have been following this mailing list for a while.  This is my take on your questions, in general.  I am sure the p2 professionals will chime in if I am way off base (which I may be but I am just trying to be helpful).
Installing via dropins is classed as a manual operation.
If you manually customize your eclispe installation in this manner you are accepting responsibility over this part of the system and must likewise uninstall it manually too.  From looking at the eclispe (3.4) code I have seen that typically you cant just remove the bundle(s), you must rename them to xyz.jar.del then p2 will uninstall it.
I believe dropins bundle upgrades are also treated as optional.  I am not sure how best to express this but my understanding here is that if there are any potential conflicts then the system will give your dropin bundle upgrade the lowest priority and therefore it may not happen.  Or put another way official software updates are given a higher priority.  I am a little unclear on this myself so this is a best guess. 
I think I am also right in saying that if you wrap your bundle(s) in a feature and also bump the feature version when a contained bundle is versioned too then p2 is guaranteed to pick this up; i.e. manage your bundles through features and observe eclipse's version numbering and you wont go too far wrong.

From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Ravi Sankar V
Sent: 01 March 2009 07:04
To: P2 developer discussions

Subject: Re: [p2-dev] Installing plug-ins from a local folder

Sorry, there were quite a few issues we faced with p2 and links. It took some time for me to gather the info and summarize. Here is the list

1) The plugins & features installed via links through p2 don't have uninstall enabled from the software update manager UI. However, they are shown under the installed software tab. Every plugin if its installed through p2 should be uninstalled through p2. That's the p2 rule, right. So, i find this missing for the links approach. 
2) If the link file is deleted from the dropins/links folder, then the plugins are still loaded. Effective, once plugins and features are installed into eclipse via links there is no way to uninstall them !!
3) Deleting the directory referred in the links file seems to work properly, but sometimes we observed that the eclipse crashed without loading. This is intermittent and can be ignored i guess.
4) If the directory referred in the links file is updated, then the update is not reflected properly. For example, i had an old clear case plugin installed. I copied a new clearcase version into the same directory. p2 still loaded the previous version. Then I deleted the previous version and loaded the new plugin alone from the same directory, it too didn't work. p2 update manager showed the older version still in the installed software tab, while "manage configuration" showed some errors. The basic motto is the service pack installation. We ship our plugins and service pack plugins in the same directory and the directory is referred by links file and we want the newest plugins to be picked up from this directory. The workaround we found for this problem is to run clean using p2 director application.

eclipse.exe -nosplash -consolelog -application org.eclipse.equinox.p2.director.app.application -clean

5) Sometimes, I don't have the exact reproducible steps, but observed it quite often, is the following annoying behavior. When the release and service pack features and plugins are in the same directory, and that directory is referred by the links file, then the feature picked up is always the latest. However, some of the plugins are of release version and some of service pack version. Here is a post that describes the problem.

I am not sure if there are bugs logged concerning these issues, but some of the above are blockers for us to use the links approach using p2. Its so painful to try a lot of approaches for a simple case of loading local plugins and yet no working solution. This should have been one of the basic use case that p2 should support right?

So, back to my original question.
I want to know the p2 recommended mechanism in eclipse 3.4 of loading plug-ins using p2 from a local folder.
1) there shouldn't be any copy of the plug-ins created for this purpose (using local site copies the plugins/features to eclipse plugins/features) and
2) if the local folder gets updated the p2 should automatically install/uninstall the plug-ins (this is not working using links).