Skip to content

Commit f52203d

Browse files
committed
osenum: Apparently VGIDs aren't always equal to the Data UUID.
Signed-off-by: Hector Martin <[email protected]>
1 parent 532450d commit f52203d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/osenum.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,12 @@ def collect_part(self, part):
105105

106106
volumes["Data"] = by_device[data[0]["DeviceIdentifier"]]
107107
volumes["System"] = by_device[system[0]["DeviceIdentifier"]]
108-
part.os.append(self.collect_os(part, volumes))
108+
vgid = vg["APFSVolumeGroupUUID"]
109+
part.os.append(self.collect_os(part, volumes, vgid))
109110

110111
return part.os
111112

112-
def collect_os(self, part, volumes):
113+
def collect_os(self, part, volumes, vgid):
113114
mounts = {}
114115

115116
for role in ("Preboot", "Recovery", "System"):
@@ -121,7 +122,6 @@ def collect_os(self, part, volumes):
121122
except:
122123
mounts["Data"] = None
123124

124-
vgid = volumes["Data"]["APFSVolumeUUID"]
125125
rec_vgid = volumes["Recovery"]["APFSVolumeUUID"]
126126

127127
stub = not os.path.exists(os.path.join(mounts["System"], "Library"))

0 commit comments

Comments
 (0)