This commit replaces the use of "sanity" with more inclusive
naming. When `// sanity` is used to check if an interface is
implemented the comment `expected interface is implemented`
is used.
change the behavior of an alt attribute matcher when matching against
a list of values to match the alternatives to each element and not
overall
this is the approach used by all other matchers against a list of
values
the old behavior was unused and as the new tests show the new behavior
is quite productive. if really needed expressing for different
variants of a list can still be done by expressing variants for one
full level up
to avoid uses of this confusing old snapd make sure format: 5 is used
to mark snap-declarations that use alt attribute matchers going
forward
FindSequence finds a sequence-forming assertion based the given
headers. Provided headers must contain a prefix of the primary key
for the assertion type except for the sequence header.
Th assertion is the first in the sequence under the prefix with
sequential number > after.
If after is -1 it returns instead the assertion with the largest
sequential number.
This will allow to hand out system-user assertions limited to a
limited set of serial assertions.
Implements the spec in https://forum.snapcraft.io/t/18163