From 59e791d404ce35c101631d48f59fd3683a9e4f29 Mon Sep 17 00:00:00 2001 From: Johnson Earls Date: Wed, 28 Sep 2016 19:05:10 -0700 Subject: [PATCH] Fix createrepo version check Merge the version-not-specified and version-greater-than-0.4.6 logic into a single if statement. If either is true, _then_ check if the version is not specified in order to give the error message, but in either case, correctly set the groupfilename. --- mrepo | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mrepo b/mrepo index 0b42649..e80059b 100755 --- a/mrepo +++ b/mrepo @@ -896,9 +896,9 @@ class Repo: sys.path.remove("/usr/share/createrepo") ### If version < 0.4.6, then use the old createrepo behaviour - if not createrepo_version: - error(0, '%s: Version of createrepo could not be found. Assuming newer than 0.4.6.' % self.dist.nick) - elif vercmp(createrepo_version, '0.4.6') > 0: + if not createrepo_version or vercmp(createrepo_version, '0.4.6') > 0: + if not createrepo_version: + error(0, '%s: Version of createrepo could not be found. Assuming newer than 0.4.6.' % self.dist.nick) groupfilename = 'comps.xml' opts = ' ' + cf.createrepooptions