Write out a repo file for the media

This commit is contained in:
jkeating@localhost.localdomain 2007-09-18 15:12:31 -04:00 committed by Jesse Keating
parent ec1ecc368d
commit c2d4e9ed34
2 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,6 @@
* Tue Sep 18 2007 Jesse Keating <jkeating@redhat.com>
- Drop a .repo file on the root of the media. Used after install.
* Fri Sep 14 2007 Jesse Keating <jkeating@redhat.com>
- Create repoview content in the tree
- Move the .composeinfo file into the directory we actually publish

View File

@ -314,7 +314,7 @@ class Pungi(pypungi.PungiBase):
createrepo.append('--outputdir')
if self.config.getint('default', 'discs') == 1:
os.makedirs('%s-disc1' % self.topdir)
os.makedirs('%s-disc1' % self.topdir) # rename this for single disc
createrepo.append('%s-disc1' % self.topdir)
createrepo.append('--basedir')
@ -333,6 +333,18 @@ class Pungi(pypungi.PungiBase):
# run the command
pypungi._doRunCommand(createrepo, self.logger)
# Write out a repo file for the disc to be used on the installed system
self.logger.info('Creating media repo file.')
repofile = open(os.path.join('%s-disc1' % self.topdir, 'media.repo'), 'w')
repocontent = """[InstallMedia]
name=%s %s
mediaid=%s
gpgcheck=0
""" % (self.config.get('default', 'name'), self.config.get('default', 'version'), mediaid)
repofile.write(repocontent)
repofile.close()
def doCreateIsos(self):
"""Create isos from the various split directories."""