- fix whitespace issues with tab characters vs spaces
- fix invalid variable names in livemediacreator handler - add parser for ostree pxe2live to cli
This commit is contained in:
parent
41fa543e09
commit
44f02cd254
2 changed files with 11 additions and 8 deletions
|
|
@ -2876,16 +2876,16 @@ class LiveMediaTask(ImageTask):
|
||||||
]
|
]
|
||||||
|
|
||||||
# Determine what LMC opperation we are doing: live-iso, live-pxe, disk-img.
|
# Determine what LMC opperation we are doing: live-iso, live-pxe, disk-img.
|
||||||
if live-iso:
|
if live_iso:
|
||||||
# we set the fs label to the same as the isoname if it exists,
|
# we set the fs label to the same as the isoname if it exists,
|
||||||
# taking at most 32 characters
|
# taking at most 32 characters
|
||||||
isoname = '%s-%s-%s' % (name, version, release)
|
isoname = '%s-%s-%s' % (name, version, release)
|
||||||
cmd.extend(['--make-iso', '--volid', isoname[:32]])
|
cmd.extend(['--make-iso', '--volid', isoname[:32]])
|
||||||
|
|
||||||
elif live-ostree-pxe:
|
elif live_ostree_pxe:
|
||||||
cmd.extend(['--make-ostree-live'])
|
cmd.extend(['--make-ostree-live'])
|
||||||
|
|
||||||
elif disk-img:
|
elif disk_img:
|
||||||
img_name='disk.img'
|
img_name='disk.img'
|
||||||
prj_name='Fedora'
|
prj_name='Fedora'
|
||||||
cmd.extend(['--make-disk',
|
cmd.extend(['--make-disk',
|
||||||
|
|
@ -2894,10 +2894,10 @@ class LiveMediaTask(ImageTask):
|
||||||
'--releasever', release
|
'--releasever', release
|
||||||
])
|
])
|
||||||
|
|
||||||
else
|
else:
|
||||||
# bail
|
# bail
|
||||||
raise koji.LiveMediaError, \
|
raise koji.LiveMediaError, \
|
||||||
'This task needs an option: --live-iso or --live-ostree-pxe or --disk-img'
|
'This task needs an option: --live-iso or --live-ostree-pxe or --disk-img'
|
||||||
|
|
||||||
# Run livemedia-creator
|
# Run livemedia-creator
|
||||||
rv = broot.mock(['--cwd', '/tmp', '--chroot', '--'] + cmd)
|
rv = broot.mock(['--cwd', '/tmp', '--chroot', '--'] + cmd)
|
||||||
|
|
|
||||||
5
cli/koji
5
cli/koji
|
|
@ -5252,6 +5252,8 @@ def handle_spin_livemedia(options, session, args):
|
||||||
help=_("SCM URL to spec file fragment to use to generate wrapper RPMs"))
|
help=_("SCM URL to spec file fragment to use to generate wrapper RPMs"))
|
||||||
parser.add_option("--skip-tag", action="store_true",
|
parser.add_option("--skip-tag", action="store_true",
|
||||||
help=_("Do not attempt to tag package"))
|
help=_("Do not attempt to tag package"))
|
||||||
|
parser.add_option("--live-ostree-pxe", action="store_true",
|
||||||
|
help=_("Build a live pxe boot squashfs image of Atomic Host"))
|
||||||
(task_options, args) = parser.parse_args(args)
|
(task_options, args) = parser.parse_args(args)
|
||||||
|
|
||||||
# LMC operations
|
# LMC operations
|
||||||
|
|
@ -5636,7 +5638,8 @@ def _build_image(options, task_opts, session, args, img_type):
|
||||||
|
|
||||||
hub_opts = {}
|
hub_opts = {}
|
||||||
for opt in ('isoname', 'ksurl', 'ksversion', 'scratch', 'repo',
|
for opt in ('isoname', 'ksurl', 'ksversion', 'scratch', 'repo',
|
||||||
'release', 'skip_tag', 'vmem', 'vcpu', 'format', 'specfile'):
|
'release', 'skip_tag', 'vmem', 'vcpu', 'format', 'specfile',
|
||||||
|
'live_ostree_pxe'):
|
||||||
val = getattr(task_opts, opt, None)
|
val = getattr(task_opts, opt, None)
|
||||||
if val is not None:
|
if val is not None:
|
||||||
hub_opts[opt] = val
|
hub_opts[opt] = val
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue