[Carbon-dev] Uninstalling features
Saminda Wijeratne
samindaw at wso2.com
Thu Sep 24 00:33:00 PDT 2009
The reason for this type of behaviour is the dependancies among features.
For example the service-management feature is dependant on service-hosting
feature. Therefore if you try to uninstall the service hosting feature it
will not be uninstalled since the service-management feature is dependant on
it.
* Imagine the case you have a pure carbon and you try to install
service-management only. Then due to the dependency the service-hosting will
also be installed as a dependant feature. how p2 sees the installed features
will be like this,
*feature a
feature b
service-management feature
\_ service-hosting feature
feature c
feature d
....*
Here the service-hosting is present as a subfeature of service-management.
If you try to uninstall the service-management feature it will uninstall
both service-management and service hosting features.
* Imagine you try to install both the service-hosting and service-management
features (in the given order). Then the p2 will see the installed features
like this,
*feature a
feature b
service-management feature
service-hosting feature
feature c
feature d
....*
Here both the service-hosting and service-management features are in the
same level.
scenario 1: uninstall the service-management feature only the
service-management will be uninstalled and service-hosting is left intact.
*feature a*
* feature b*
*service-hosting feature*
* feature c*
* feature d*
* ....*
scenario 2: uninstall the service-hosting feature.
*feature a*
*feature b*
*service-management feature*
* \_ service-hosting feature*
*feature c*
*feature d*
*....*
What happens here is that thoerotically the service-hosting feature is
uninstalled. But due to the dependancy the profile is updated to look at it
as a dependant feature for service-management feature. Therefore practically
speaking the service-hosting feature isn't uninstalled.
Currently our command line commands do not depict these dependencies. We
need to update it to show dependancies so that they can understand why some
features were not uninstalled. I think we can clearly show these once we got
UI console for p2 up and running.
Saminda
On Thu, Sep 24, 2009 at 9:55 AM, Sameera Jayasoma <sameera at wso2.com> wrote:
> Hi Srinath.
>
> The bundle you were trying to uninstall "*
> org.wso2.carbon.governance.ui.policy*" belongs to the "*
> org.wso2.carbon.governance.metadata.server.feature.group*" feature. AFAIK,
> it is not possible to uninstall the bundle, because there is a feature
> depends on the it. The recommended approach is to perform provisioning
> operations with features, not with bundles. And also we haven't tested this.
> But you can install/uninstall bundles and p2 will figure out the depedencies
> and install them also.
>
> Here are the steps that I followed to uninstell metadata feature and they
> worked :)
>
> osgi> provaddrepo
> http://builder.wso2.org/~carbon/carbon-2.0.1-final/p2-repo/<http://builder.wso2.org/%7Ecarbon/carbon-2.0.1-final/p2-repo/>
> // add the metadata repo
>
> osgi> provaddartifactrepo
> http://builder.wso2.org/~carbon/carbon-2.0.1-final/p2-repo/<http://builder.wso2.org/%7Ecarbon/carbon-2.0.1-final/p2-repo/>
> // add the artifact repo
>
> You need add the repository even when you need to uninstall things.
>
> osgi> provlinstalledg //lists the installed features
>
> osgi> provuninstall org.wso2.carbon.governance.metadata.ui.feature.group
> 2.0.1
>
> This metadata feature depends on following bundles. In order to achieve
> your goal of uninstalling ui.policy bundle, now you can try installing
> following bundle except the ui.policy bundle. This may not work for other
> features. :)
>
> org.wso2.carbon.governance.ui.list
> org.wso2.carbon.governance.ui.policy
> org.wso2.carbon.governance.ui.schema
> org.wso2.carbon.governance.ui.services
> org.wso2.carbon.governance.ui.wsdl
> org.wso2.carbon.governance.ui.wsdltool
>
> Thanks
> Sameera
>
> On Wed, Sep 23, 2009 at 9:58 PM, Afkham Azeez <azeez at wso2.com> :
>
> I heard that you need to add the repo first to avoid this issue. You cannot
>> uninstall bundles but only features. So you need to do a "provlg" and get
>> the list of features and then uninstall.
>> Azeez
>>
>>
>> On Tue, Sep 22, 2009 at 12:08 PM, Srinath Perera <srinath at wso2.com>wrote:
>>
>>> Hi All;
>>>
>>> I am trying to uninstall selected features from carbon. I tried
>>> following command
>>>
>>>
>>> provuninstall org.wso2.carbon.governance.ui.policy 2.0.1
>>> WSO2CarbonProfile
>>>
>>> But got the following error. Can anyone has a clue?
>>>
>>> Thanks
>>> Srinath
>>>
>>> uninstallation failed
>>> org.eclipse.equinox.internal.provisional.p2.core.ProvisionException:
>>> Installable unit not found: org.wso2.carbon.governance.ui.policy 2.0.1
>>> Repositories searched:
>>>
>>> file:/mnt/wso2greg-3.0.1/repository/components/configuration/org.eclipse.osgi/bundles/215/data/listener_1925729951/
>>>
>>> at
>>> org.eclipse.equinox.internal.p2.console.ProvisioningHelper.uninstall(ProvisioningHelper.java:284)
>>> at
>>> org.eclipse.equinox.internal.p2.console.ProvCommandProvider._provuninstall(ProvCommandProvider.java:160)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>> at
>>> org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
>>> at
>>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:303)
>>> at
>>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:288)
>>> at
>>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:224)
>>> at java.lang.Thread.run(Thread.java:619)
>>>
>>>
>>> --
>>> ============================
>>> Srinath Perera, Ph.D.
>>> WSO2 Inc. http://wso2.com
>>> Blog: http://srinathsview.blogspot.com/
>>>
>>> _______________________________________________
>>> Carbon-dev mailing list
>>> Carbon-dev at wso2.org
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>
>>
>>
>>
>> --
>> --
>> Afkham Azeez
>> azeez at wso2.com
>> WSO2 Inc. http://wso2.com
>> Blog: http://afkham.org
>>
>> _______________________________________________
>> Carbon-dev mailing list
>> Carbon-dev at wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
> _______________________________________________
> Carbon-dev mailing list
> Carbon-dev at wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.wso2.org/pipermail/carbon-dev/attachments/20090924/42e85959/attachment-0001.htm
More information about the Carbon-dev
mailing list