From e2f79e49f6ab331689a9827df0cf31d81c7f021d Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 3 Mar 2008 16:09:53 -0500 Subject: [PATCH] Handle netinst.iso files. --- Changelog | 4 ++++ pungi.spec | 2 +- src/pypungi/pungi.py | 42 +++++------------------------------------- 3 files changed, 10 insertions(+), 38 deletions(-) diff --git a/Changelog b/Changelog index 90f3cd0e..6c8ea9de 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,7 @@ +* Mon Mar 03 2008 Jesse Keating +- Copy the netinst iso over to the isos/ directory +- Require a new enough anaconda for this + * Thu Feb 28 2008 Jesse Keating - Make sure we get fresh repomd.xml each time we run - Don't autoclean the repodata, some of it can be reused diff --git a/pungi.spec b/pungi.spec index 66b69039..c0b64eee 100644 --- a/pungi.spec +++ b/pungi.spec @@ -10,7 +10,7 @@ License: GPLv2 URL: https://fedorahosted.org/pungi Source0: https://fedorahosted.org/pungi/attachment/wiki/%{version}/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: anaconda-runtime, yum => 3.0.3, repoview +Requires: anaconda-runtime >= 11.4.0.41, yum => 3.0.3, repoview BuildRequires: python-devel BuildArch: noarch diff --git a/src/pypungi/pungi.py b/src/pypungi/pungi.py index 133bbd86..bd2c4c25 100755 --- a/src/pypungi/pungi.py +++ b/src/pypungi/pungi.py @@ -536,47 +536,15 @@ cost=500 # Write out a line describing the CD set self.writeinfo('mediaset: %s' % ' '.join(isolist)) - # Now make rescue images + # Now copy the netinst iso if not self.config.get('default', 'arch') == 'source' and \ - os.path.exists('/usr/lib/anaconda-runtime/mk-rescueimage.%s' % self.config.get('default', 'arch')): - isoname = '%s-%s-%s-rescuecd.iso' % (self.config.get('default', 'iso_basename'), + os.path.exists(os.path.join(self.topdir, 'images', 'netinst.iso')): + isoname = '%s-%s-%s-netinst.iso' % (self.config.get('default', 'iso_basename'), self.config.get('default', 'version'), self.config.get('default', 'arch')) isofile = os.path.join(self.isodir, isoname) - # make the rescue tree - rescue = ['/usr/lib/anaconda-runtime/mk-rescueimage.%s' % self.config.get('default', 'arch')] - rescue.append(self.topdir) - rescue.append(self.workdir) - rescue.append(self.config.get('default', 'iso_basename')) - rescue.append(self.config.get('default', 'product_path')) - - # run the command - pypungi._doRunCommand(rescue, self.logger) - - # write the iso - extraargs = [] - - if self.config.get('default', 'arch') == 'i386' or self.config.get('default', 'arch') == 'x86_64': - extraargs.extend(x86bootargs) - elif self.config.get('default', 'arch') == 'ia64': - extraargs.extend(ia64bootargs) - elif self.config.get('default', 'arch') == 'ppc': - extraargs.extend(ppcbootargs) - extraargs.append(os.path.join(self.workdir, "%s-rescueimage" % self.config.get('default', 'arch'), "ppc/mac")) - elif self.config.get('default', 'arch') == 'sparc': - extraargs.extend(sparcbootargs) - - extraargs.append('-V') - extraargs.append('%s %s %s Rescue' % (self.config.get('default', 'name'), - self.config.get('default', 'version'), self.config.get('default', 'arch'))) - - extraargs.append('-o') - extraargs.append(isofile) - - extraargs.append(os.path.join(self.workdir, "%s-rescueimage" % self.config.get('default', 'arch'))) - - # run the command - pypungi._doRunCommand(mkisofs + extraargs, self.logger) + # copy the netinst iso to the iso dir + shutil.copy2(os.path.join(self.topdir, 'images', 'netinst.iso'), isofile) # shove the sha1sum into a file sha1file = open(os.path.join(self.isodir, 'SHA1SUM'), 'a')