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

Commit c1f1de2

Browse files
committed
Fix logic for detecting os treeinfo entries based on arch
1 parent 80077eb commit c1f1de2

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

virtinst/OSDistro.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ def hasTreeinfo(self, fetcher, progresscb):
7070

7171
def acquireKernel(self, fetcher, progresscb):
7272
if self.hasTreeinfo(fetcher, progresscb):
73-
if self.type is None:
74-
arch = self.treeinfo.get("general", "arch")
73+
if self.type == "xen":
74+
type = "xen"
7575
else:
76-
arch = self.type
76+
type = self.treeinfo.get("general", "arch")
7777

78-
kernelpath = self.treeinfo.get("images-%s" % arch, "kernel")
79-
initrdpath = self.treeinfo.get("images-%s" % arch, "initrd")
78+
kernelpath = self.treeinfo.get("images-%s" % type, "kernel")
79+
initrdpath = self.treeinfo.get("images-%s" % type, "initrd")
8080
else:
8181
# fall back to old code
8282
if self.type is None:
@@ -99,8 +99,11 @@ def acquireKernel(self, fetcher, progresscb):
9999

100100
def acquireBootDisk(self, fetcher, progresscb):
101101
if self.hasTreeinfo(fetcher, progresscb):
102-
arch = self.treeinfo.get("general", "arch")
103-
return fetcher.acquireFile(self.treeinfo.get("images-%s" % arch, "boot.iso"), progresscb)
102+
if self.type == "xen":
103+
type = "xen"
104+
else:
105+
type = self.treeinfo.get("general", "arch")
106+
return fetcher.acquireFile(self.treeinfo.get("images-%s" % type, "boot.iso"), progresscb)
104107
else:
105108
return fetcher.acquireFile("images/boot.iso", progresscb)
106109

0 commit comments

Comments
 (0)