Android R Preview 4 (RPP4.200409.015)
abi: Fix stripping of abidiff impacted interfaces.

abitool.py can produce a "short" report. This is the same as the full
"abidiff --leaf-changes-only" report except that every stanza like:

  2 impacted interfaces:
    something
    something

is supposed to be replaced by:

  2 impacted interfaces

The code currently identifies, using a regex, the lines to remove as
those having some indent followed by some text. Typically these
stanzas appear as the last child stanza of a top-level diff
description which is followed by a blank line, so the regex typically
works.

However, if the stanzas appear elsewhere, the current regex consumes
the entire remaining text of the containing top-level diff
description, unless this itself contains a spurious empty line.

This patch changes the regex to consume based on indentation level.

Bug: 151614036
Change-Id: I86012311fbdfca31dc8725be07f6d00681b250ff
Signed-off-by: Giuliano Procida <gprocida@google.com>
1 file changed