mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-13 20:28:21 +10:00
sys_patch: Clean LE properly
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
- Applicable for BCM94328, BCM94322 and Atheros chipsets
|
||||
- Implement Wifi-only patches when no internet connection available but required (ie. KDKs)
|
||||
- Allows users to install Legacy Wireless patches, then connect to the internet to install remaining patches
|
||||
- Resolve `/Library/Extensions` not being cleaned on KDK-less root patches
|
||||
- Increment Binaries:
|
||||
- PatcherSupportPkg 0.7.2 - release
|
||||
|
||||
|
||||
@@ -339,23 +339,20 @@ class PatchSysVolume:
|
||||
if self.constants.detected_os < os_data.os_data.big_sur:
|
||||
return
|
||||
|
||||
oclp_path = "/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist"
|
||||
if not Path(oclp_path).exists():
|
||||
return
|
||||
|
||||
print("- Cleaning Auxiliary Kernel Collection")
|
||||
oclp_plist_data = plistlib.load(Path(oclp_path).open("rb"))
|
||||
|
||||
for key in oclp_plist_data:
|
||||
if "Install" not in oclp_plist_data[key]:
|
||||
continue
|
||||
for location in oclp_plist_data[key]["Install"]:
|
||||
if not location.endswith("Extensions"):
|
||||
oclp_path = "/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist"
|
||||
if Path(oclp_path).exists():
|
||||
oclp_plist_data = plistlib.load(Path(oclp_path).open("rb"))
|
||||
for key in oclp_plist_data:
|
||||
if "Install" not in oclp_plist_data[key]:
|
||||
continue
|
||||
for file in oclp_plist_data[key]["Install"][location]:
|
||||
if not file.endswith(".kext"):
|
||||
for location in oclp_plist_data[key]["Install"]:
|
||||
if not location.endswith("Extensions"):
|
||||
continue
|
||||
self.remove_file("/Library/Extensions", file)
|
||||
for file in oclp_plist_data[key]["Install"][location]:
|
||||
if not file.endswith(".kext"):
|
||||
continue
|
||||
self.remove_file("/Library/Extensions", file)
|
||||
|
||||
# Handle situations where users migrated from older OSes with a lot of garbage in /L*/E*
|
||||
# ex. Nvidia Web Drivers, NetUSB, dosdude1's patches, etc.
|
||||
|
||||
Reference in New Issue
Block a user