Description of problem:
The consumer's syspurpose compliance is calculated wrong when the pool he is attached to has at least one role in common with the one he specified.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
- Have a consumer with installed product "product1" and set syspurpose role to "myrole".
- Attach directly to a pool which provides product1, which has its roles product attribute set to "myrole"
- Query the syspurpose compliance.
The syspurpose compliance returned has status 'invalid', and has 1 item in 'partiallyCompliantProducts' and 1 item in 'reasons'.
The syspurpose compliance returned should have status 'valid', and should have no 'partiallyCompliantProducts' or 'reasons', since the pool supports the role that the consumer has specified (myrole).
The problem is in rules.js, which uses the product attribute name 'role' instead of 'roles'.