Sort image rpm components before inserting

Related: https://pagure.io/koji/issue/3637

A potential fix for a rare deadlock. This is the same thing we do in
BuildRoot._setList()
This commit is contained in:
Mike McLean 2023-08-25 09:44:56 -04:00
parent 657409d73c
commit 3676452468

View file

@ -10069,6 +10069,8 @@ def importImageInternal(task_id, build_info, imgdata):
else:
data = get_rpm(an_rpm, strict=True)
rpm_ids.append(data['id'])
# we sort to try to avoid deadlock issues
rpm_ids.sort()
# associate those RPMs with the image
insert = BulkInsertProcessor('archive_rpm_components')