[
https://issues.apache.org/jira/browse/SLING-9860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17222841#comment-17222841
]
Karl Pauls commented on SLING-9860:
-----------------------------------
An example where the above becomes problematic is when you have a bundle that
has problematic meta-data which makes the substitution go wrong e.g.: the
org.yaml:snakeyaml bundles have meta-data that is somewhat problematic. They
import what they export for some packages but not for all - unfortunately, some
of the packages they import have dependencies on the packages they don't import
(and they don't capture that with uses-constraints). Consequently, one can get
LinkageErrors if e.g. org.yaml:snakeyaml:1.27 and org.yaml:snakeyaml:1.24 are
used side-by-side.
When using the current ALL merge, the result would be that
org.yaml:snakeyaml:1.24 is in both features - which would not allow e.g. the
api-regions to force it to wire to itself for the broken imports. If we do the
change proposed here, it would only be in the original feature - allowing the
api-regions to force the right resolution.
> Merging artifacts with the ALL strategy should keep the origins for clashing
> bundles and their origins only
> ------------------------------------------------------------------------------------------------------------
>
> Key: SLING-9860
> URL: https://issues.apache.org/jira/browse/SLING-9860
> Project: Sling
> Issue Type: Improvement
> Components: Feature Model
> Affects Versions: Feature Model 1.2.10
> Reporter: A. J. David Bosschaert
> Assignee: A. J. David Bosschaert
> Priority: Major
> Fix For: Feature Model 1.2.12
>
>
> When merging 2 features that both contain the same artifact, but in different
> versions, both artifacts are preserved, however, the feature-origins of one
> of the artifact contains both features instead of just its own feature.
> For example Feature A contains:
> * bundle org.foo:bar:1.2
> And Feature B contains
> * bundle org.foo:bar:1.3
> Then once merged with the ALL strategy the resulting feature contains the
> artifact with (origins A,B).
> While this allows for package substitution to work between the bundles it can
> be problematic in cases where that is not desired for isolation purposes. As
> the interpretation of the origins is up to extensions, it seems better to not
> make the union decision in this place but leave it up to merge extensions and
> handlers later.
> In other words, we should change this so that the origins for version 1.2
> should be just A, not both A and B.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)