summaryrefslogtreecommitdiffstats
path: root/src/software/openlmi/software/LMI_SoftwareInstalledPackage.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/software/openlmi/software/LMI_SoftwareInstalledPackage.py')
-rw-r--r--src/software/openlmi/software/LMI_SoftwareInstalledPackage.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/software/openlmi/software/LMI_SoftwareInstalledPackage.py b/src/software/openlmi/software/LMI_SoftwareInstalledPackage.py
index b59121d..8914c47 100644
--- a/src/software/openlmi/software/LMI_SoftwareInstalledPackage.py
+++ b/src/software/openlmi/software/LMI_SoftwareInstalledPackage.py
@@ -461,14 +461,12 @@ class LMI_SoftwareInstalledPackage(CIMProvider2): #pylint: disable=R0904
(evr_str, object_name["Software"]["Name"]))
pkglist = ydb.doPackageLists('all', showdups=True)
+ # NOTE: available ∩ installed = ∅
exact, _, _ = yum.packages.parsePackages(
itertools.chain(pkglist.available, pkglist.installed),
[orig.name])
- # NOTE: available ∩ installed = ∅
- exact = sorted(exact, key=lambda a:a.evra)
-
try:
- pkg = [ p for p in exact
+ pkg = [ p for p in sorted(exact)
if (not param_epoch or param_epoch == p.epoch)
and (not param_version or param_version == p.ver)
and (not param_release or param_release == p.rel) ] [-1]