-
Committer:
Iain Lane
-
Date:
2021-03-04 17:07:52 UTC
-
Revision ID:
iain.lane@canonical.com-20210304170752-5xxh67vxkn964xif
promote-to-release: Use copyPackage's move support
Currently we copy a package from proposed to release, and then separately
delete it from proposed. Either the copy or the deletion can fail, and then we
can end up with incomplete migrations. It's better to have both or neither
happen.
`copyPackage()` on the Launchpad API has a `move` boolean parameter that
combines copying and deletion into one call. Use that instead. This doesn't
solve all cases where the copier might reject a copy we ask it to do, but it
does mean that at least in those cases the package will still be in proposed
rather than nowhere as could happen previously.