Bug 559118 - Add testcase and fix reexport uses constraint check

This is a testcase that reproduces the issue found in bug 558895. When
an exporter of a split package requires multiple bundles that also
export the split package and that bundle does a reexport on one of the
parts it can cause resolution issues for uses constraints.

The actual problem is with reexport itself.  The reexporting bundle does
not have to also export the package to cause the issue.  The problem is
that each part of the package pulled in from the require-reexport is
checked in isolation with the using bundles wire to the same package
name.  This is incorrect because that is only a subset of the actual
used package from the perspective of the exported package that is using
the split package.

The fix is to record all the package  parts for the split used package
from the wiring of the bundle exporting the package that uses the split
package.  That way during the compatibility check we can accurately use
the set of sources for the split package that the exporting bundle is
using.

Change-Id: I5d6194adabc7c04fe990d663ad1dd6bb77f2ac39
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
2 files changed