Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-update-dev] Problems with UninstallCommand

Paul,

I am not sure but it I think you should first use DisableCommand for the
features you want to subsequently uninstall. One of the consequences of the
'disable' command may be a request to restart the workbench.

Branko has recently added the capability to disable and uninstall features
in one go. This works from the UI but I don't know if he propagated this
operation to commands as well. It would be very handy. Branko?

Regards,

Dejan Glozic, Ph.D.
Manager, Eclipse Development 1A
D1/R0Q/8200/MKM
IBM Canada Ltd.
Tel. 905 413-2745  T/L 969-2745
Fax. 905 413-4850



                                                                           
             Paul M Vanderlei                                              
             <pvlei@xxxxxxxxxx                                             
             >                                                          To 
             Sent by:                  platform-update-dev@xxxxxxxxxxx     
             platform-update-d                                          cc 
             ev-bounces@eclips                                             
             e.org                                                 Subject 
                                       [platform-update-dev] Problems with 
                                       UninstallCommand                    
             02/02/2006 10:19                                              
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
             "Eclipse Platform                                             
             Update component                                              
             developers list."                                             
                                                                           
                                                                           




I am trying to use UninstallCommand to uninstall a feature that I had
previously installed with InstallCommand.

Here's the code I wrote:

UninstallCommand command = new UninstallCommand(featureFullName, null,
null, "false");
command.run();
command.applyChangesNow();

It seems that UninstallCommand does lots of things, but never really gets
around to uninstalling the three bundles that comprise my feature. I
noticed if I insert a breakpoint before the command.run(), and if I then
manually stop and uninstall the bundles at the osgi command line, that the
UninstallCommand then seems to work fine, removing the feature and plug-ins
from the various Eclipse caches and registries and also from the file
system.

I was confused specifically about the "toSite" parameter in the
UninstallCommand. Since I am running  on my target locally and using an
update site on my local file system, I was not at all sure what to put for
"toSite". It seemed odd to me to need a "to" site when the very notion of
uninstalling seems to demand a "from" and the to is sorta implied to be to
the trash. There really is no destination in my thinking. So I used null,
but this is purely a guess.

Am I missing something obvious?

I suspect that the answer is that I am *supposed* to do the stopping and
uninstalling myself. If this is the case, how do I get from the name and
version (Strings) of a feature to the actual bundles associated with that
feature as it is installed? It also seems to matter that I uninstall these
bundles in top-down order. Any clues on how I can determine that at
runtime?

Thanks for any and all insights.

Paul VanderLei
Embedded Java Enablement Team
1750 Ridgemoor SE
Grand Rapids, MI 49506
616.975.1985
pvlei@xxxxxxxxxx

"I don't see architecture coming from you." -Jerry Seinfeld


_______________________________________________
platform-update-dev mailing list
platform-update-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-update-dev




Back to the top