Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 5a894c0

Browse files
committed
Fix previous commit
1 parent f2b6efd commit 5a894c0

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

virtinst/DistroInstaller.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ def _prepare_kernel_and_initrd(self, guest, meter):
233233
readOnly=True,
234234
transient=True)
235235

236-
if self._install_bootconfig.kernel:
236+
# Make sure we always fetch kernel here if required
237+
if self._install_bootconfig.kernel and not self.scratchdir_required():
237238
return disk
238239

239240
# Need to fetch the kernel & initrd from a remote site, or
@@ -279,19 +280,14 @@ def _get_bootdev(self, isinstall, guest):
279280
# General Installer methods
280281

281282
def scratchdir_required(self):
283+
if not self.location:
284+
return False
285+
282286
is_url = not self._location_is_path
283287
mount_dvd = self._location_is_path and not self.cdrom
284288

285289
return bool(is_url or mount_dvd)
286290

287-
def cleanup(self):
288-
Installer.Installer.cleanup(self)
289-
290-
if self.scratchdir_required():
291-
# Reruns of the install process should refetch kernel
292-
self._install_bootconfig.kernel = None
293-
self._install_bootconfig.initrd = None
294-
295291
def prepare(self, guest, meter):
296292
self.cleanup()
297293

0 commit comments

Comments
 (0)