Skip to content

Commit

Permalink
Merge commit 'refs/pull/84/head' of https://github.com/dagwieers/mrepo
Browse files Browse the repository at this point in the history
updated comps behaviour to support CENTOS6 and RHEL6
  • Loading branch information
ws4e committed Apr 22, 2016
2 parents ac132a7 + 0d11f05 commit 5045329
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mrepo
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@ class Dist:
os_components = (
glob.glob(pathjoin(self.dir + '/disc1/*/base/comps.xml')) + # RHEL 4
glob.glob(pathjoin(self.dir + '/disc1/*/repodata/comps-*-core.xml')) + # RHEL 5
glob.glob(pathjoin(self.dir + '/disc1/repodata/*-comps*.xml')) + # RHEL 6 / CentOS 6
glob.glob(pathjoin(self.dir + '/disc1/repodata/*-comps*.xml')) + # RHEL 6
glob.glob(pathjoin(self.dir + '/disc1/repodata/*-comps.xml')) + # CentOS 6
glob.glob(pathjoin(self.dir + '/disc1/repodata/comps.xml')) # Scientific Linux 6
)

Expand Down Expand Up @@ -890,7 +891,7 @@ class Repo:

### Find the createrepo version we are using (due to groupfile usage changes)
createrepo_version = None
groupfilename = 'RPMS.%s/comps.xml' % self.name
groupfilename = 'comps.xml'

sys.path.append("/usr/share/createrepo")
try:
Expand All @@ -909,8 +910,8 @@ class Repo:
### 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:
groupfilename = 'comps.xml'
elif vercmp(createrepo_version, '0.4.6') < 0:
groupfilename = 'RPMS.%s/comps.xml' % self.name

opts = ' ' + cf.createrepooptions
if op.force:
Expand Down

0 comments on commit 5045329

Please sign in to comment.