This is fairly complicated to explain, but here goes.

I am trying to understand what the behaviour should be in the
following circumstance:

- bundle A exports a package and is used by bundles B, C and D
- bundle E exports a package with the same name and is not used by any bundle
- A new repository.xml is deployed using OBR with an updated version
of bundle A *without* the exported package

My observation is that:

- Two versions of bundle A now exist
- All the previous wirings are retained to the package in the old
bundle are retained. Similarly, existing package wirings to other
packages are also retained
- Bundle E is not used, still.
- The new version of the bundle "may be" used for some package
wirings, but not worked out the behaviour there yet.

Does this sound correct? And am I correct in thinking the problem was
in originally having a split package?

Now, in more detail and with proper bundle/package names:

I have a bundle `com.elsten.bliss.platform`. Here are the wirings before update:

---
    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]

---

And services:

---
    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]
---

Now I update, which updates the bundle and a number of bundles
besides. I perform this with a _management agent_ coded by myself
which uses OBR to update the new bundle versions and then calls
refresh.

After this occurs, I set a breakpoint in
`com.elsten.bliss.main.PlatformImpl` so I can test the wirings again.
I expect that the old `com.elsten.bliss.main.Platform` has been
removed. However:

---
    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)
---

Now there are two versions! So I print the wiring (at this stage the
services are not wired so no point in including them):

---
    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]
---

And the new bundle:

---
    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]
---

So the new bundle is barely being used for anything.

My suspicion is that it's something to do with the withdrawal of the
`com.elsten.bliss.licence` package. This was removed, but note that
this always existed (before the update):

---
    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]
---

Any help with understanding this would be greatly appreciated. Also,
ways of getting out of this mess.

Thanks,

Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to