Martin Peřina has uploaded a new change for review.
Change subject: kdump: Fix version comparisons
......................................................................
kdump: Fix version comparisons
Removes architecture from release so version comparisons work correctly:
This returns True which is wrong in our case:
LooseVersion('2.0.0.273.el6') >= LooseVersion(2.0.0.273.1)
This retutns False which is correct in our case:
LooseVersion('2.0.0.273') >= LooseVersion(2.0.0.273.1)
Change-Id: Ica14bd688c73a511ad8d7557231cff2e184830a9
Bug-Url: https://bugzilla.redhat.com/1079821
Signed-off-by: Martin Perina <[email protected]>
---
M src/plugins/ovirt-host-deploy/kdump/packages.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-host-deploy
refs/changes/17/29317/1
diff --git a/src/plugins/ovirt-host-deploy/kdump/packages.py
b/src/plugins/ovirt-host-deploy/kdump/packages.py
index 9a81225..244ca2f 100644
--- a/src/plugins/ovirt-host-deploy/kdump/packages.py
+++ b/src/plugins/ovirt-host-deploy/kdump/packages.py
@@ -169,9 +169,10 @@
)
self.logger.debug("minver: %s, result=%s", min_version, result)
for package in result:
+ # remove arch from release to fix version comparison
cur_version = '%s-%s' % (
package['version'],
- package['release'],
+ package['release'][:package['release'].rindex('.')],
)
if LooseVersion(cur_version) >= LooseVersion(min_version):
self.environment[odeploycons.KdumpEnv.SUPPORTED] = True
--
To view, visit http://gerrit.ovirt.org/29317
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica14bd688c73a511ad8d7557231cff2e184830a9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-host-deploy
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches