Do I understand correctly that you have a requirement that filters on symbolicname name, but it not being correctly evaluated? Perhaps you could show what you are doing as opposed to what you think needs to be fixed...

In short, requirements are only satisfied by capabilities.

-> richard

Roshan Punnoose wrote:
I am trying to deploy a repository xml through OBR and I noticed that my
<require> tags do not work if I am using the "symbolicname" filter. Looking
through the code, it looks like the LocalRepositoryImpl is adding the header
properties: symbolicName, version, etc, to the Resource directly, and the
import package information is being added as capabilities. However, the
ResolverImpl only looks through the LocalRepositoryImpl's capabilities and
not the Resource map directly.

Here is the current code:

 private List searchLocalResources(Requirement req)
    {
        List matchingCandidates = new ArrayList();
        Resource[] resources = m_local.getResources();
        for (int resIdx = 0; (resources != null) && (resIdx <
resources.length); resIdx++)
        {
            Capability[] caps = resources[resIdx].getCapabilities();
            for (int capIdx = 0; (caps != null) && (capIdx < caps.length);
capIdx++)
            {
                if (req.isSatisfied(caps[capIdx]))
                {
                    matchingCandidates.add(resources[resIdx]);
                }
            }
        }

        return matchingCandidates;
    }


Shouldn't the code actually check if the Requirement (req) is satisfied by
the Resource map (the one that holds the header information: symbolicname,
version) also, instead of only the capability?

Roshan


Reply via email to