isoname now impacts the iso fs label

This commit is contained in:
Jay Greguske 2010-03-11 07:09:01 -05:00 committed by Mike McLean
parent 005963851c
commit f90f6b856d

View file

@ -2531,10 +2531,16 @@ class LiveCDTask(ImageTask):
kspath = self.fetchKickstart(broot, ksfile)
kskoji = self.prepareKickstart(repo_info, target_info, arch, broot, kspath)
# Run livecd-creator
cachedir = '/tmp/koji-livecd' # arbitrary paths in chroot
livecd_log = '/tmp/livecd.log'
cmd = ['/usr/bin/livecd-creator', '-c', kskoji, '-d', '-v', '--logfile', livecd_log, '--cache', cachedir]
# we set the fs label to the same as the isoname if it exists,
# taking at most 32 characters
name_opt = self.opts.get('isoname')
if name_opt:
cmd.extend(('-f', name_opt[:32]))
# Run livecd-creator
rv = broot.mock(['--cwd', '/tmp', '--chroot', '--'] + cmd)
self.uploadFile(os.path.join(broot.rootdir(), livecd_log[1:]))
if rv:
@ -2571,8 +2577,8 @@ class LiveCDTask(ImageTask):
# copy the iso out of the chroot. If we were given an isoname, this is
# where the renaming happens.
self.logger.debug('uploading image: %s' % isosrc)
if self.opts.get('isoname'):
isofile = self.opts['isoname']
if name_opt:
isofile = name_opt
if not isofile.endswith('.iso'):
isofile += '.iso'
self.uploadFile(isosrc, remoteName=isofile)