Skip to content

Commit

Permalink
Simplify core features to prevent unnecessary bundle refreshes (#1709)
Browse files Browse the repository at this point in the history
It seems that when multiple features install the same bundle it may cause Karaf to refresh bundles when (un)installing features.
When the (redundant) openhab-core-automation feature is removed and the serial dependencies are merged into the openhab-transport-serial feature these restarts due these bundle refreshes no longer occur.

Fixes #1322, #1354

Signed-off-by: Wouter Born <[email protected]>
  • Loading branch information
wborn authored Oct 10, 2020
1 parent 159aeff commit 76f5102
Showing 1 changed file with 17 additions and 57 deletions.
74 changes: 17 additions & 57 deletions features/karaf/openhab-core/src/main/feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,49 +74,28 @@
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.auth.oauth2client/${project.version}</bundle>
</feature>

<feature name="openhab-core-automation" version="${project.version}">
<feature>openhab-core-base</feature>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.automation/${project.version}</bundle>
</feature>

<feature name="openhab-core-automation-module-script" version="${project.version}">
<feature>openhab-core-base</feature>
<feature dependency="true">openhab-core-automation</feature>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.automation.module.script/${project.version}</bundle>
</feature>

<feature name="openhab-core-automation-module-script-rulesupport" version="${project.version}">
<feature>openhab-core-base</feature>
<feature dependency="true">openhab-core-automation</feature>
<feature dependency="true">openhab-core-automation-module-script</feature>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.automation.module.script.rulesupport/${project.version}</bundle>
</feature>

<feature name="openhab-core-automation-module-media" version="${project.version}">
<feature>openhab-core-base</feature>
<feature dependency="true">openhab-core-automation</feature>
<feature dependency="true">openhab-core-automation-module-script</feature>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.automation.module.media/${project.version}</bundle>
</feature>

<feature name="openhab-core-automation-rest" version="${project.version}">
<feature>openhab-core-base</feature>
<feature dependency="true">openhab-core-automation</feature>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.automation.rest/${project.version}</bundle>
</feature>

<feature name="openhab-core-config-serial" version="${project.version}">
<feature>openhab-core-base</feature>
<feature>openhab-core-io-transport-serial</feature>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.config.serial/${project.version}</bundle>
</feature>

<feature name="openhab-core-config-discovery-usbserial" version="${project.version}">
<feature>openhab-core-base</feature>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.config.discovery.usbserial/${project.version}</bundle>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/${project.version}</bundle>
</feature>

<feature name="openhab-core-io-bin2json" description="Binary to JSON converter" version="${project.version}">
<feature>openhab-core-base</feature>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.bin2json/${project.version}</bundle>
Expand Down Expand Up @@ -222,15 +201,6 @@
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.mqtt/${project.version}</bundle>
</feature>

<feature name="openhab-core-io-transport-serial" version="${project.version}">
<feature>openhab-core-base</feature>
<requirement>osgi.service;filter:="(objectClass=org.openhab.core.io.transport.serial.SerialPortManager)"</requirement>
<requirement>osgi.service;filter:="(objectClass=org.openhab.core.io.transport.serial.SerialPortProvider)"</requirement>
<feature dependency="true">openhab-core-io-transport-serial-rxtx</feature>

<bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial/${project.version}</bundle>
</feature>

<feature name="openhab-core-io-transport-serial-javacomm" version="${project.version}">
<feature>openhab-core-base</feature>

Expand All @@ -241,29 +211,6 @@
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial.javacomm/${project.version}</bundle>
</feature>

<feature name="openhab-core-io-transport-serial-rxtx" version="${project.version}">
<feature>openhab-core-base</feature>

<requirement>openhab.tp;filter:="(&amp;(feature=serial)(impl=rxtx))"</requirement>
<feature dependency="true">openhab.tp-serial-rxtx</feature>

<bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial/${project.version}</bundle>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial.rxtx/${project.version}</bundle>
</feature>

<feature name="openhab-core-io-transport-serial-rfc2217" version="${project.version}">
<feature>openhab-core-base</feature>

<requirement>openhab.tp;filter:="(&amp;(feature=serial)(impl=rxtx))"</requirement>
<feature dependency="true">openhab-core-io-transport-serial-rxtx</feature>

<requirement>openhab.tp;filter:="(feature=commons-net)"</requirement>
<feature dependency="true">openhab.tp-commons-net</feature>

<bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial/${project.version}</bundle>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial.rxtx.rfc2217/${project.version}</bundle>
</feature>

<feature name="openhab-core-io-transport-upnp" version="${project.version}">
<feature>openhab-core-base</feature>

Expand Down Expand Up @@ -422,7 +369,6 @@
<feature>openhab-core-automation-rest</feature>
<feature>openhab-core-automation-module-script</feature>
<feature>openhab-core-automation-module-media</feature>
<feature>openhab-core-automation</feature>
<feature>openhab-core-io-console-karaf</feature>
<feature>openhab-core-io-http-auth</feature>
<feature>openhab-core-io-rest-auth</feature>
Expand Down Expand Up @@ -494,9 +440,23 @@
</feature>

<feature name="openhab-transport-serial" description="Serial Transport" version="${project.version}">
<feature>openhab-core-io-transport-serial-rfc2217</feature>
<feature>openhab-core-config-serial</feature>
<feature>openhab-core-config-discovery-usbserial</feature>
<feature>openhab-core-base</feature>

<requirement>osgi.service;filter:="(objectClass=org.openhab.core.io.transport.serial.SerialPortManager)"</requirement>
<requirement>osgi.service;filter:="(objectClass=org.openhab.core.io.transport.serial.SerialPortProvider)"</requirement>

<requirement>openhab.tp;filter:="(feature=commons-net)"</requirement>
<feature dependency="true">openhab.tp-commons-net</feature>

<requirement>openhab.tp;filter:="(&amp;(feature=serial)(impl=rxtx))"</requirement>
<feature dependency="true">openhab.tp-serial-rxtx</feature>

<bundle>mvn:org.openhab.core.bundles/org.openhab.core.config.serial/${project.version}</bundle>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.config.discovery.usbserial/${project.version}</bundle>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/${project.version}</bundle>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial/${project.version}</bundle>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial.rxtx/${project.version}</bundle>
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial.rxtx.rfc2217/${project.version}</bundle>
</feature>

<feature name="openhab-transport-upnp" description="UPnP Transport" version="${project.version}">
Expand Down

0 comments on commit 76f5102

Please sign in to comment.