- Do things faster/smarter if we've only asked for one disc
This commit is contained in:
parent
eae5edcb56
commit
e2c43c0a93
@ -1,3 +1,6 @@
|
||||
* Tue Mar 14 2007 Jesse Keating <jkeating@redhat.com>
|
||||
- Do things faster/smarter if we've only asked for one disc
|
||||
|
||||
* Tue Mar 13 2007 Jesse Keating <jkeating@redhat.com>
|
||||
- log the rpm2cpio stuff for release notes
|
||||
- correctly capture errors from subprocess
|
||||
|
@ -126,6 +126,10 @@ class Pungi:
|
||||
"""Run anaconda-runtime's pkgorder on the tree, used for splitting media."""
|
||||
|
||||
|
||||
# non-op for only one disc
|
||||
if self.config.getint('default', 'discs') == 1:
|
||||
return
|
||||
|
||||
pkgorderfile = open(os.path.join(self.workdir, 'pkgorder-%s' % self.config.get('default', 'arch')), 'w')
|
||||
# setup the command
|
||||
pkgorder = ['/usr/lib/anaconda-runtime/pkgorder']
|
||||
@ -201,6 +205,10 @@ class Pungi:
|
||||
sized chunks."""
|
||||
|
||||
|
||||
# non-op for only one disc
|
||||
if self.config.getint('default', 'discs') == 1:
|
||||
return
|
||||
|
||||
timber = splittree.Timber()
|
||||
timber.arch = self.config.get('default', 'arch')
|
||||
timber.target_size = float(self.config.get('default', 'cdsize')) * 1024 * 1024
|
||||
@ -256,7 +264,10 @@ class Pungi:
|
||||
"""Create the split metadata for the isos"""
|
||||
|
||||
|
||||
if self.config.getint('default', 'discs') > 1:
|
||||
discinfo = open('%s-disc1/.discinfo' % self.topdir, 'r').readlines()
|
||||
else:
|
||||
discinfo = open(os.path.join(self.topdir, '.discinfo'), 'r').readlines()
|
||||
mediaid = discinfo[0].rstrip('\n')
|
||||
|
||||
# set up the process
|
||||
@ -270,11 +281,18 @@ class Pungi:
|
||||
createrepo.append('media://%s' % mediaid)
|
||||
|
||||
createrepo.append('--outputdir')
|
||||
if self.config.getint('default', 'discs') == 1:
|
||||
os.makedirs('%s-disc1' % self.topdir)
|
||||
createrepo.append('%s-disc1' % self.topdir)
|
||||
|
||||
createrepo.append('--basedir')
|
||||
if self.config.getint('default', 'discs') == 1:
|
||||
createrepo.append(self.topdir)
|
||||
createrepo.append(self.topdir)
|
||||
else:
|
||||
createrepo.append('%s-disc1' % self.topdir)
|
||||
|
||||
if self.config.getint('default', 'discs') > 1:
|
||||
createrepo.append('--split')
|
||||
|
||||
for disc in range(1, self.config.getint('default', 'discs') + 1):
|
||||
@ -312,6 +330,7 @@ class Pungi:
|
||||
|
||||
ppcbootargs.append('-hfs-bless') # must be last
|
||||
|
||||
if self.config.getint('default', 'discs') > 1:
|
||||
for disc in range(1, self.config.getint('default', 'discs') + 1): # cycle through the CD isos
|
||||
isoname = '%s-%s-%s-disc%s.iso' % (self.config.get('default', 'iso_basename'), self.config.get('default', 'version'),
|
||||
self.config.get('default', 'arch'), disc)
|
||||
@ -357,7 +376,7 @@ class Pungi:
|
||||
|
||||
isolist=[]
|
||||
# We've asked for more than one disc, and we're not srpms, so make a DVD image
|
||||
if self.config.getint('default', 'discs') > 1 and not self.config.get('default', 'arch') == 'source':
|
||||
if self.config.getint('default', 'discs') >= 1 and not self.config.get('default', 'arch') == 'source':
|
||||
isoname = '%s-%s-%s-DVD.iso' % (self.config.get('default', 'iso_basename'), self.config.get('default', 'version'),
|
||||
self.config.get('default', 'arch'))
|
||||
isofile = os.path.join(self.isodir, isoname)
|
||||
@ -383,6 +402,9 @@ class Pungi:
|
||||
extraargs.extend(ia64bootargs)
|
||||
elif self.config.get('default', 'arch') == 'ppc':
|
||||
extraargs.extend(ppcbootargs)
|
||||
if self.config.getint('default', 'discs') == 1:
|
||||
extraargs.append(os.path.join(self.topdir, "ppc/mac")) # this may work for both cases.. test
|
||||
else:
|
||||
extraargs.append(os.path.join('%s-disc%s' % (self.topdir, disc), "ppc/mac"))
|
||||
|
||||
extraargs.append('-V')
|
||||
|
Loading…
Reference in New Issue
Block a user