lp:~jdstrand/review-tools

Owned by Jamie Strandboge
Get this repository:
git clone https://git.launchpad.net/~jdstrand/review-tools
Only Jamie Strandboge can upload to this repository. If you are Jamie Strandboge please log in for upload directions.

Branches

Name Last Modified Last Commit
master 2020-07-27 23:06:48 UTC
sr_declaration.py: fix matching for allow with multiple constraints

Author: Jamie Strandboge
Author Date: 2020-07-27 23:06:48 UTC

sr_declaration.py: fix matching for allow with multiple constraints

_check_constraints1() correctly handled deny* with multiple constraints
but would incorrectly match allow*. As an invariant, if multiple
constraints are specified, they all must match, but a 'match' is
dependent on if it is an allow or deny constraint. Specifically,
_check_constraints1() collects the error strings for a particular
alternation and when checks were performed will return an error if:

- at least one check errored with 'allow' since not fully matching
  the allow means means we should display an error (not allowed)
- all checks errored with 'deny' since not fully matching the
  deny means we should pass (allowed)

In practice, this wasn't a problem since declarations didn't have
constraints that when combined would exhibit the error (eg, snap-type
other than 'app' are handled elsewhere; the same is true of
on-store/on-brand). plug-names was added to be used with plug-attributes
but needed store support which was only added (relatively) recently. In
making the corresponding updates to the review-tools to consider
plug-names with plug-attributes to verify interface references for
personal-files and system-files, the issue was discovered.

11 of 1 result
This repository contains Public information 
Everyone can see this information.

Subscribers