cranky: review-master-changes: Fix the case when the base in the changelog is not in the tree
In some cases, the base version referenced in the changelog is not
reachable because another version (later version) of the base already
includes those changes.
For example, cycle 2023.04.17 of kinetic:linux includes the
Ubuntu-5.19.0-43.44 release, on top of which a respin of linux-aws was
done, which pulled in the aws changelog the logs for
Ubuntu-5.19.0-43.44. The next cycle for kinetic:linux (2023.05.15-1)
includes the actual fixes in Ubuntu-5.19.0-43.44 but releases them
Ubuntu-5.19.0-44.45. When trying to crank 2023.05.15-1 for linux-aws,
review-master-changes will fail as it can't match the version in its
changelog (Ubuntu-5.19.0-43.44) for the master kernel with any commits
in the rebased tree over 2023.05.15-1.
This patch changes how "review-master-changes" finds the commit for
computing the diff of changes in "debian.master". Currently, the command
gets the last base version in the changelog, finds its commit message
and tries to match it against the current tree (HEAD). To avoid the
corner case described above (where we don't have a matching commit in
the current tree), we compute "prev_commit" by finding the common
ancestor of the fetched version (from changelog) and current HEAD.
This change assumes that the primary kernels pull in the right changes
from the previous cycle.
ancillary-bot: retry in the face of download/extraction failures
As we know we are downloading source packages which have been accepted
by the archive it is in theory impossible for those to be malformed.
Any download or extraction failures are more likley related to a failure
to fetch the correct contents. In those cases mark the id for "retry"
which triggers the full removal and a reattempt on the next cycle.
Signed-off-by: Andy Whitcroft <email address hidden>