Handle netinst.iso files.

This commit is contained in:
Jesse Keating 2008-03-03 16:09:53 -05:00 committed by Jesse Keating
parent 8a89242100
commit e2f79e49f6
3 changed files with 10 additions and 38 deletions

View File

@ -1,3 +1,7 @@
* Mon Mar 03 2008 Jesse Keating <jkeating@redhat.com>
- Copy the netinst iso over to the isos/ directory
- Require a new enough anaconda for this
* Thu Feb 28 2008 Jesse Keating <jkeating@redhat.com>
- Make sure we get fresh repomd.xml each time we run
- Don't autoclean the repodata, some of it can be reused

View File

@ -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

View File

@ -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')