[
https://issues.apache.org/jira/browse/KARAF-5123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Christian Schneider updated KARAF-5123:
---------------------------------------
Description:
To reproduce:
feature:repo-add activemq 5.14.5
feature:install activemq-client
feature:repo-remove activemq-5.14.5
After this step karaf is in an invalid state but no error / warning is shown
feature:install jdbc
Error executing command: Unable to resolve root: missing requirement [root]
osgi.identity; osgi.identity=activemq-client; type=karaf.feature;
version="[5.14.5,5.14.5]";
filter:="(&(osgi.identity=activemq-client)(type=karaf.feature)(version>=5.14.5)(version<=5.14.5))"
When installing any other feature karaf complains about the feature
activemq-client as it knowns it should be installed but does not find the repo
anymore.
The workaround is to remove all features that are now not available anymore in
one step. Removing individually does not work if there are more than one
feature missing as feature:uninstall is only executed if it leaves karaf in a
valid state.
I propose we these things:
- At least we need to provide a warning when executing feature:repo-remove and
list all features that are now unavailable.
- Even better would be to refuse to remove the repo when some of its features
are still needed. Eventually we want an override like -f to force removal.
was:
To reproduce:
feature:repo-add activemq 5.14.5
feature:install activemq-client
feature:repo-remove activemq-5.14.5
# After this step karaf is in an invalid state but no error / warning is shown
feature:install jdbc
Error executing command: Unable to resolve root: missing requirement [root]
osgi.identity; osgi.identity=activemq-client; type=karaf.feature;
version="[5.14.5,5.14.5]";
filter:="(&(osgi.identity=activemq-client)(type=karaf.feature)(version>=5.14.5)(version<=5.14.5))"
When installing any other feature karaf complains about the feature
activemq-client as it knowns it should be installed but does not find the repo
anymore.
The workaround is to remove all features that are now not available anymore in
one step. Removing individually does not work if there are more than one
feature missing as feature:uninstall is only executed if it leaves karaf in a
valid state.
I propose we these things:
- At least we need to provide a warning when executing feature:repo-remove and
list all features that are now unavailable.
- Even better would be to refuse to remove the repo when some of its features
are still needed. Eventually we want an override like -f to force removal.
> Executing feature:repo-remove can leave karaf in an invalid state
> -----------------------------------------------------------------
>
> Key: KARAF-5123
> URL: https://issues.apache.org/jira/browse/KARAF-5123
> Project: Karaf
> Issue Type: Bug
> Components: karaf-feature
> Affects Versions: 4.1.1
> Reporter: Christian Schneider
> Assignee: Christian Schneider
> Fix For: 4.2.0, 4.1.2
>
>
> To reproduce:
> feature:repo-add activemq 5.14.5
> feature:install activemq-client
> feature:repo-remove activemq-5.14.5
> After this step karaf is in an invalid state but no error / warning is shown
> feature:install jdbc
> Error executing command: Unable to resolve root: missing requirement
> [root] osgi.identity; osgi.identity=activemq-client; type=karaf.feature;
> version="[5.14.5,5.14.5]";
> filter:="(&(osgi.identity=activemq-client)(type=karaf.feature)(version>=5.14.5)(version<=5.14.5))"
> When installing any other feature karaf complains about the feature
> activemq-client as it knowns it should be installed but does not find the
> repo anymore.
> The workaround is to remove all features that are now not available anymore
> in one step. Removing individually does not work if there are more than one
> feature missing as feature:uninstall is only executed if it leaves karaf in a
> valid state.
> I propose we these things:
> - At least we need to provide a warning when executing feature:repo-remove
> and list all features that are now unavailable.
> - Even better would be to refuse to remove the repo when some of its features
> are still needed. Eventually we want an override like -f to force removal.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)