From f90f6b856d3db443d1302a492ef9f0835dfd55f0 Mon Sep 17 00:00:00 2001 From: Jay Greguske Date: Thu, 11 Mar 2010 07:09:01 -0500 Subject: [PATCH] isoname now impacts the iso fs label --- builder/kojid | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/builder/kojid b/builder/kojid index 9d7eca5d..5e0039a0 100755 --- a/builder/kojid +++ b/builder/kojid @@ -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)