From c2d4e9ed34262b362f015dc1183d83bdd18b0724 Mon Sep 17 00:00:00 2001 From: "jkeating@localhost.localdomain" <> Date: Tue, 18 Sep 2007 15:12:31 -0400 Subject: [PATCH] Write out a repo file for the media --- Changelog | 3 +++ pypungi/pungi.py | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 5a87321d..43ef0916 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,6 @@ +* Tue Sep 18 2007 Jesse Keating +- Drop a .repo file on the root of the media. Used after install. + * Fri Sep 14 2007 Jesse Keating - Create repoview content in the tree - Move the .composeinfo file into the directory we actually publish diff --git a/pypungi/pungi.py b/pypungi/pungi.py index 5a5f1ee9..135045f0 100755 --- a/pypungi/pungi.py +++ b/pypungi/pungi.py @@ -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."""