Skip to content

Commit cd6b27f

Browse files
committed
main.py: Drop self.osi
This partially reverts da724b6, since now we can just instantiate a StubInstaller for existing installs. Signed-off-by: Hector Martin <[email protected]>
1 parent 1638ca4 commit cd6b27f

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

src/main.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def action_resume(self, oses):
329329
p_message("delete the partitions manually and reinstall from scratch.")
330330
return True
331331

332-
self.dutil.remount_rw(self.osi.system)
332+
self.dutil.remount_rw(self.ins.osi.system)
333333

334334
# Unhide the SystemVersion, if hidden
335335
self.ins.prepare_for_bless()
@@ -342,7 +342,6 @@ def do_install(self, total_size=None):
342342

343343
self.ins.prepare_volume(self.part)
344344
self.ins.check_volume()
345-
self.osi = self.ins.osi
346345
self.ins.install_files(self.cur_os)
347346

348347
self.osins.partition_disk(self.part.name, total_size)
@@ -411,7 +410,7 @@ def set_reduced_security(self):
411410
print()
412411
p_progress("Preparing the new OS for booting in Reduced Security mode...")
413412
try:
414-
subprocess.run(["bputil", "-g", "-v", self.osi.vgid,
413+
subprocess.run(["bputil", "-g", "-v", self.ins.osi.vgid,
415414
"-u", self.admin_user, "-p", self.admin_password], check=True)
416415
break
417416
except subprocess.CalledProcessError:
@@ -428,7 +427,7 @@ def bless(self):
428427
p_progress("Setting the new OS as the default boot volume...")
429428
try:
430429
subprocess.run(["bless", "--setBoot",
431-
"--device", "/dev/" + self.osi.sys_volume,
430+
"--device", "/dev/" + self.ins.osi.sys_volume,
432431
"--user", self.admin_user, "--stdinpass"],
433432
input=self.admin_password.encode("utf-8"),
434433
check=True)
@@ -441,7 +440,7 @@ def bless(self):
441440
p_warning("Let's try a different way. Sorry, you'll have to type it in again.")
442441
try:
443442
subprocess.run(["bless", "--setBoot",
444-
"--device", "/dev/" + self.osi.sys_volume,
443+
"--device", "/dev/" + self.ins.osi.sys_volume,
445444
"--user", self.admin_user], check=True)
446445
print()
447446
return
@@ -460,7 +459,7 @@ def step2(self):
460459
bootpicker_works = sys_ver >= (12, 3)
461460
if not bootpicker_works and self.ipsw:
462461
bootpicker_works = sys_ver >= split_ver(self.ipsw.min_macos)
463-
if is_1tr and self.osi.paired:
462+
if is_1tr and self.ins.osi.paired:
464463
subprocess.run([self.ins.step2_sh], check=True)
465464
self.startup_disk(recovery=True, volume_blessed=True, reboot=True)
466465
elif is_recovery:
@@ -493,7 +492,7 @@ def step2_indirect(self):
493492
p_success( "Installation successful!")
494493
print()
495494
p_progress("Install information:")
496-
p_info( f" APFS VGID: {col()}{self.osi.vgid}")
495+
p_info( f" APFS VGID: {col()}{self.ins.osi.vgid}")
497496
if self.osins and self.osins.efi_part:
498497
p_info(f" EFI PARTUUID: {col()}{self.osins.efi_part.uuid.lower()}")
499498
print()

0 commit comments

Comments
 (0)