Skip to content

Commit 4eb5d1c

Browse files
committed
Fix InstalledRPM usage in the clearpackageconflicts actor
1 parent aac7a90 commit 4eb5d1c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

repos/system_upgrade/cloudlinux/actors/clearpackageconflicts/libraries/clearpackageconflicts.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
22
import errno
3-
from re import L
43
import shutil
54

65
from leapp.libraries.stdlib import api
@@ -80,5 +79,12 @@ def lua_cjson_handle(package_lookup):
8079

8180

8281
def process():
83-
rpm_lookup = {rpm.name for rpm in api.consume(InstalledRPM)}
82+
rpm_lookup = set()
83+
# Each InstalledRPM is a list of RPM objects.
84+
# There's a bunch of other fields, but all that we're interested in here is their names.
85+
installed_rpm_messages = api.consume(InstalledRPM)
86+
for rpm_list in installed_rpm_messages:
87+
rpm_names = [item.name for item in rpm_list.items]
88+
rpm_lookup.update(rpm_names)
89+
8490
alt_python37_handle(rpm_lookup)

0 commit comments

Comments
 (0)