更新和刷新后没有删除旧包 - (重新)移动包

时间:2014-08-05 14:36:22

标签: osgi updates apache-felix

我有一个包com.elsten.bliss.platform。以下是更新前的接线:

g! inspect capability osgi.wiring.package 59
com.elsten.bliss.platform [59] provides:
----------------------------------------
osgi.wiring.package; com.elsten.bliss.client.impl 1.1.0 required by:
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.licence 1.0.1 required by:
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.main 2.0.5 required by:
   com.elsten.bliss.ui.systemtray [23]
   com.elsten.bliss.api [40]
osgi.wiring.package; com.elsten.bliss.music.policy.config 1.0.0 required by:
   com.elsten.bliss.ui [33]
   com.elsten.bliss.configuration.file [72]
osgi.wiring.package; com.elsten.bliss.music.policy.coverartpolicy 1.1.0 required by:
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.music.policy.coverartpolicy.assessment 1.0.0 required by:
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.music.policy.coverartpolicy.response 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.fileorg 1.1.0 required by:
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.music.policy.fileorg.pattern 1.0.0 required by:
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.music.policy.fileorg.pattern.token 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tag.auto 1.0.0 required by:
   com.elsten.bliss.untagged.acoustid [52]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync 1.0.0 required by:
   jdbm-trunk-patched [20]
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.allowablegenres 1.0.0 required by:
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.consolidateartist 1.0.1 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.response 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.trackartist 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.tracknumberformat 1.0.0 required by:
   jdbm-trunk-patched [20]
osgi.wiring.package; com.elsten.bliss.music.policy2 1.0.1 required by:
   com.elsten.bliss.ui [33]
   com.elsten.bliss.configuration.file [72]
osgi.wiring.package; com.elsten.bliss.platform.storage.bus 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.storage.file.jaudiotagger 1.0.0 required by:
   jdbm-trunk-patched [20]
osgi.wiring.package; com.elsten.bliss.platform.tagindex 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.util2 1.0.0 required by:
   com.elsten.bliss.web.debug [14]
osgi.wiring.package; com.elsten.bliss.untagged2 1.0.0 required by:
   com.elsten.bliss.untagged.acoustid [52]
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.platform.activity 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform2 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.storage.file 1.0.0 required by:
   com.elsten.bliss.configuration.file [72]
osgi.wiring.package; com.elsten.bliss.music.conceptual 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.tagged.mapper 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.storage.file.jaudiotagger.tag 28.1.2 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.regex 28.1.2 [UNUSED]
osgi.wiring.package; com.elsten.bliss.client.platform 1.0.0 [UNUSED]

服务:

g! inspect capability service 59
com.elsten.bliss.platform [59] provides:
----------------------------------------
service; com.elsten.bliss.client.Client with properties:
   service.id = 31
   Used by:
      com.elsten.bliss.ui [33]
service; com.elsten.bliss.licence.PerFixLicenceStore with properties:
   service.id = 32
   Used by:
      com.elsten.bliss.ui [33]
service; com.elsten.bliss.music.policy2.PerFixLicensedPolicyCommandExecutor with properties:
   service.id = 33
service; com.elsten.bliss.main.Platform with properties:
   component.id = 5
   component.name = com.elsten.bliss.main.PlatformImpl
   coverArtLookupStrategy.target = (rootLookupStrategy=true)
   informationSource.target = (getTags=true)
   service.id = 34
   Used by:
      com.elsten.bliss.api [40]
      com.elsten.bliss.ui.systemtray [23]

现在我更新了,它更新了捆绑包和许多捆绑包。我使用自己编码的管理代理执行此操作,该代理使用OBR更新新的捆绑版本,然后调用refresh。

发生这种情况后,我在com.elsten.bliss.main.PlatformImpl设置断点,这样我就可以再次测试接线。我希望旧的com.elsten.bliss.main.Platform已被删除。但是:

g! lb platform
START LEVEL 1
   ID|State      |Level|Name
   59|Active     |    1|com.elsten.bliss.platform (28.1.2)
   84|Resolved   |    1|com.elsten.bliss.platform (28.1.3)

现在有两个版本!所以我打印布线(在这个阶段,服务没有连接,所以没有必要包括它们):

g! inspect capability osgi.wiring.package 59
com.elsten.bliss.platform [59] provides:
----------------------------------------
osgi.wiring.package; com.elsten.bliss.client.impl 1.1.0 required by:
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.licence 1.0.1 required by:
   com.elsten.bliss.ui [33]
   com.elsten.bliss.platform [84]
osgi.wiring.package; com.elsten.bliss.main 2.0.5 required by:
   com.elsten.bliss.ui.systemtray [23]
   com.elsten.bliss.api [40]
osgi.wiring.package; com.elsten.bliss.music.policy.config 1.0.0 required by:
   com.elsten.bliss.ui [33]
   com.elsten.bliss.configuration.file [72]
osgi.wiring.package; com.elsten.bliss.music.policy.coverartpolicy 1.1.0 required by:
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.music.policy.coverartpolicy.assessment 1.0.0 required by:
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.music.policy.coverartpolicy.response 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.fileorg 1.1.0 required by:
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.music.policy.fileorg.pattern 1.0.0 required by:
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.music.policy.fileorg.pattern.token 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tag.auto 1.0.0 required by:
   com.elsten.bliss.untagged.acoustid [52]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync 1.0.0 required by:
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.allowablegenres 1.0.0 required by:
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.consolidateartist 1.0.1 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.response 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.trackartist 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.tracknumberformat 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy2 1.0.1 required by:
   com.elsten.bliss.ui [33]
   com.elsten.bliss.configuration.file [72]
osgi.wiring.package; com.elsten.bliss.platform.storage.bus 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.storage.file.jaudiotagger 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.tagindex 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.util2 1.0.0 required by:
   com.elsten.bliss.web.debug [14]
osgi.wiring.package; com.elsten.bliss.untagged2 1.0.0 required by:
   com.elsten.bliss.untagged.acoustid [52]
   com.elsten.bliss.ui [33]
osgi.wiring.package; com.elsten.bliss.platform.activity 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform2 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.storage.file 1.0.0 required by:
   com.elsten.bliss.configuration.file [72]
osgi.wiring.package; com.elsten.bliss.music.conceptual 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.tagged.mapper 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.storage.file.jaudiotagger.tag 28.1.2 [UNUSED]
osgi.wiring.package; com.elsten.bliss.client.platform 1.0.0 [UNUSED]

新捆绑包:

g! inspect capability osgi.wiring.package 84
com.elsten.bliss.platform [84] provides:
----------------------------------------
osgi.wiring.package; com.elsten.bliss.client.impl 1.1.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.main 2.0.5 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.config 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.coverartpolicy 1.1.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.coverartpolicy.assessment 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.coverartpolicy.response 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.fileorg 1.1.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.fileorg.pattern 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.fileorg.pattern.token 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tag.auto 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.allowablegenres 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.consolidateartist 1.0.1 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.response 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.trackartist 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.tracknumberformat 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy2 1.0.1 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.storage.bus 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.storage.file.jaudiotagger 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.tagindex 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.util2 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.untagged2 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.activity 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform2 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.storage.file 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.conceptual 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.tagged.mapper 1.0.0 [UNUSED]
osgi.wiring.package; com.elsten.bliss.platform.storage.file.jaudiotagger.tag 28.1.3 [UNUSED]
osgi.wiring.package; com.elsten.bliss.music.policy.tagsync.regex 28.1.3 required by:
   com.elsten.bliss.platform [59]
osgi.wiring.package; com.elsten.bliss.client.platform 1.0.0 [UNUSED]

所以新的捆绑包几乎没有被用于任何东西。

我怀疑这与撤回com.elsten.bliss.licence一揽子计划有关。这已被删除,但请注意,这始终存在(在更新之前):

g! lb licence
START LEVEL 1
   ID|State      |Level|Name
   69|Active     |    1|com.elsten.bliss.licence (1.0.1)
g! inspect capability osgi.wiring.package 69
com.elsten.bliss.licence [69] provides:
---------------------------------------
osgi.wiring.package; com.elsten.bliss.licence 1.0.1 [UNUSED]

所以这是一个有趣的案例:我在更新之前有一个拆分包,我不知道。但是,该拆分包的依赖关系连接到已更新的包。在捆绑更新之后,它们仍然连接到旧捆绑包。那么这是否会阻止那些捆绑重新连接到现存的com.elsten.bliss.licence

一个新想法:在更新之前,确保没有启动除引导程序包之外的所有bundle。然后,仅使用引导程序包启动Felix,检查程序包接线,然后执行更新。

结果:另一个指向拆分com.elsten.bliss.licence包的指针就是问题所在。更新后,还有两个com.elsten.bliss.platform个捆绑包。但是,旧版本只有一个接线:

osgi.wiring.package; com.elsten.bliss.licence 1.0.1 required by:
    com.elsten.bliss.platform [84]

由于已删除的软件包,新版本现在依赖于旧版本!

任何建议(包括没有你擅离的拆分包!)都接受了;)

1 个答案:

答案 0 :(得分:1)

不确定我理解。你已经安装了两次捆绑包(59和84)。所以你没有用新jar更新59。因此,您似乎没有对59进行捆绑更新。您刚刚再次安装了捆绑包(84)。所以这可以解释为什么59仍然存在并且可能在刷新后仍在使用。