mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 14:10:51 +10:00
sys_patch.py: Supress ditto logging
This commit is contained in:
@@ -319,7 +319,7 @@ class PatchSysVolume:
|
|||||||
|
|
||||||
if download_result and self.constants.payload_local_binaries_root_path_zip.exists():
|
if download_result and self.constants.payload_local_binaries_root_path_zip.exists():
|
||||||
print("- Unzipping binaries...")
|
print("- Unzipping binaries...")
|
||||||
utilities.process_status(subprocess.run(["ditto", "-V", "-x", "-k", "--sequesterRsrc", "--rsrc", self.constants.payload_local_binaries_root_path_zip, self.constants.payload_path]))
|
utilities.process_status(subprocess.run(["ditto", "-V", "-x", "-k", "--sequesterRsrc", "--rsrc", self.constants.payload_local_binaries_root_path_zip, self.constants.payload_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||||
print("- Binaries downloaded to:")
|
print("- Binaries downloaded to:")
|
||||||
print(self.constants.payload_path)
|
print(self.constants.payload_path)
|
||||||
return self.constants.payload_local_binaries_root_path
|
return self.constants.payload_local_binaries_root_path
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ def validate(settings):
|
|||||||
host_os_float = float(f"{major_kernel}.{minor_kernel}")
|
host_os_float = float(f"{major_kernel}.{minor_kernel}")
|
||||||
for patch_subject in patchset:
|
for patch_subject in patchset:
|
||||||
for patch_core in patchset[patch_subject]:
|
for patch_core in patchset[patch_subject]:
|
||||||
|
if patch_core == "Nvidia Web Drivers":
|
||||||
|
continue
|
||||||
patch_os_min_float = float(f'{patchset[patch_subject][patch_core]["OS Support"]["Minimum OS Support"]["OS Major"]}.{patchset[patch_subject][patch_core]["OS Support"]["Minimum OS Support"]["OS Minor"]}')
|
patch_os_min_float = float(f'{patchset[patch_subject][patch_core]["OS Support"]["Minimum OS Support"]["OS Major"]}.{patchset[patch_subject][patch_core]["OS Support"]["Minimum OS Support"]["OS Minor"]}')
|
||||||
patch_os_max_float = float(f'{patchset[patch_subject][patch_core]["OS Support"]["Maximum OS Support"]["OS Major"]}.{patchset[patch_subject][patch_core]["OS Support"]["Maximum OS Support"]["OS Minor"]}')
|
patch_os_max_float = float(f'{patchset[patch_subject][patch_core]["OS Support"]["Maximum OS Support"]["OS Major"]}.{patchset[patch_subject][patch_core]["OS Support"]["Maximum OS Support"]["OS Minor"]}')
|
||||||
if (host_os_float < patch_os_min_float or host_os_float > patch_os_max_float):
|
if (host_os_float < patch_os_min_float or host_os_float > patch_os_max_float):
|
||||||
@@ -76,6 +78,7 @@ def validate(settings):
|
|||||||
for install_file in patchset[patch_subject][patch_core][install_type][install_directory]:
|
for install_file in patchset[patch_subject][patch_core][install_type][install_directory]:
|
||||||
source_file = str(settings.payload_local_binaries_root_path) + "/" + patchset[patch_subject][patch_core][install_type][install_directory][install_file] + install_directory + "/" + install_file
|
source_file = str(settings.payload_local_binaries_root_path) + "/" + patchset[patch_subject][patch_core][install_type][install_directory][install_file] + install_directory + "/" + install_file
|
||||||
if not Path(source_file).exists():
|
if not Path(source_file).exists():
|
||||||
|
print(f"File not found: {source_file}")
|
||||||
raise Exception(f"Failed to find {source_file}")
|
raise Exception(f"Failed to find {source_file}")
|
||||||
|
|
||||||
print(f"Validating Root Patch Dictionary integrity for Darwin {major_kernel}.{minor_kernel}")
|
print(f"Validating Root Patch Dictionary integrity for Darwin {major_kernel}.{minor_kernel}")
|
||||||
@@ -87,8 +90,7 @@ def validate(settings):
|
|||||||
if Path(settings.payload_local_binaries_root_path_zip).exists():
|
if Path(settings.payload_local_binaries_root_path_zip).exists():
|
||||||
print("Validating Root Patch File integrity")
|
print("Validating Root Patch File integrity")
|
||||||
if not Path(settings.payload_local_binaries_root_path).exists():
|
if not Path(settings.payload_local_binaries_root_path).exists():
|
||||||
subprocess.run(["ditto", "-V", "-x", "-k", "--sequesterRsrc", "--rsrc", settings.payload_local_binaries_root_path_zip, settings.payload_path])
|
subprocess.run(["ditto", "-V", "-x", "-k", "--sequesterRsrc", "--rsrc", settings.payload_local_binaries_root_path_zip, settings.payload_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
|
|
||||||
for supported_os in [os_data.os_data.big_sur, os_data.os_data.monterey]:
|
for supported_os in [os_data.os_data.big_sur, os_data.os_data.monterey]:
|
||||||
validate_root_patch_files(supported_os, 6)
|
validate_root_patch_files(supported_os, 6)
|
||||||
print("Validating SNB Board ID patcher")
|
print("Validating SNB Board ID patcher")
|
||||||
|
|||||||
Reference in New Issue
Block a user