virt-install: Turn --os-type into a no op and warning
I'm still seeing blog posts that recommend using --os-type linux --os-variant XXX Which has been a no op for a long time but is mostly harmless. Current git would make this an error condition, but that's too disruptive IMO. Just print a warning Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
1f8afc8668
commit
3e794d2d96
|
@ -943,7 +943,7 @@ c.add_invalid("--paravirt --import --print-xml 2") # PV Import install, no seco
|
|||
c.add_invalid("--paravirt --import --print-xml 7") # Invalid --print-xml arg
|
||||
c.add_invalid("--location kernel=foo,initrd=bar") # location kernel/initrd without any url
|
||||
c.add_invalid("--location http://example.com,kernel=foo") # location without kernel+initrd specified as pair
|
||||
c.add_invalid("--os-type linux", grep="Unknown OS name 'linux'")
|
||||
c.add_valid("--pxe --os-type linux", grep="--os-type is deprecated")
|
||||
c.add_invalid("--os-variant solaris10 --unattended", grep="not support unattended")
|
||||
|
||||
c = vinst.add_category("misc-install", "--nographics --noautoconsole")
|
||||
|
|
|
@ -143,8 +143,10 @@ def convert_old_disks(options):
|
|||
|
||||
|
||||
def convert_old_os_options(options):
|
||||
if not options.os_variant and options.old_os_type:
|
||||
options.os_variant = options.old_os_type
|
||||
if not options.old_os_type:
|
||||
return
|
||||
log.warning(
|
||||
_("--os-type is deprecated and does nothing. Please stop using it."))
|
||||
del(options.old_os_type)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue