Subject: cli: Don't overwrite install bootorder with manual --boot (bz 1438946) From: Cole Robinson crobinso@redhat.com Tue Apr 4 18:22:15 2017 -0400 Date: Tue Apr 4 18:22:15 2017 -0400: Git: ff3b4dc5b0b21393dbccc0f5f691b17bf1a761bd --boot should be for post-install bootorder only https://bugzilla.redhat.com/show_bug.cgi?id=1438946 diff --git a/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml b/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml index 5fa0f24e..914403e6 100644 --- a/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml +++ b/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml @@ -60,9 +60,6 @@ hvm /foo/bar - - - diff --git a/virtinst/installer.py b/virtinst/installer.py index 50c72c73..dd2a593e 100644 --- a/virtinst/installer.py +++ b/virtinst/installer.py @@ -113,13 +113,13 @@ class Installer(object): if isinstall and not self.has_install_phase(): return - bootorder = self._build_boot_order(isinstall, guest) - - if not guest.os.bootorder: + bootorder = guest.os.bootorder + if isinstall or not bootorder: # Per device is not compatible with os/boot. if not any(d.boot.order for d in guest.get_all_devices()): - guest.os.bootorder = bootorder + bootorder = self._build_boot_order(isinstall, guest) + guest.os.bootorder = bootorder if not isinstall: return