[virt-tools-list] [virt-manager PATCH 7/9] unattended, installer: Pass _OsTree to prepare_install_script()

Fabiano Fidêncio fidencio at redhat.com
Tue Jul 16 15:14:30 UTC 2019


Later on, it'll be used to generate the install-script and the kernel
command-line based on the specific tree being used.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 virtinst/install/installer.py  | 5 ++++-
 virtinst/install/unattended.py | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/virtinst/install/installer.py b/virtinst/install/installer.py
index 40ddf301..e2765512 100644
--- a/virtinst/install/installer.py
+++ b/virtinst/install/installer.py
@@ -234,10 +234,12 @@ class Installer(object):
 
     def _prepare_unattended_script(self, guest, meter):
         url = None
+        os_tree = None
         if self._treemedia:
             if self._treemedia.is_network_url():
                 url = self.location
             os_media = self._treemedia.get_os_media(guest, meter)
+            os_tree = self._treemedia.get_os_tree(guest, meter)
             injection_method = "initrd"
         else:
             if self.conn.is_remote():
@@ -252,7 +254,8 @@ class Installer(object):
             injection_method = "cdrom"
 
         return unattended.prepare_install_script(
-                guest, self._unattended_data, url, os_media, injection_method)
+                guest, self._unattended_data, url,
+                os_media, os_tree, injection_method)
 
     def _prepare(self, guest, meter):
         unattended_script = None
diff --git a/virtinst/install/unattended.py b/virtinst/install/unattended.py
index 42bc878c..f32e60a4 100644
--- a/virtinst/install/unattended.py
+++ b/virtinst/install/unattended.py
@@ -313,7 +313,7 @@ def _lookup_rawscript(osinfo, profile, os_media):
 
 
 def prepare_install_script(guest, unattended_data,
-        url, os_media, injection_method):
+        url, os_media, os_tree, injection_method):
     def _get_installation_source(os_media):
         if not os_media:
             return "network"
-- 
2.21.0




More information about the virt-tools-list mailing list