kdk_handler: Lax n-1 logic

This commit is contained in:
Mykola Grymalyuk
2022-10-26 09:31:07 -06:00
parent 2db8cb3a85
commit db015ad79c
2 changed files with 3 additions and 1 deletions

View File

@@ -3,6 +3,8 @@
## 0.5.1 ## 0.5.1
- Add support for `APPLE SSD TS0128F/256F` SSDs in macOS Ventura - Add support for `APPLE SSD TS0128F/256F` SSDs in macOS Ventura
- ie. stock SSD found in MacBookAir6,x - ie. stock SSD found in MacBookAir6,x
- Lax KDK N-1 logic to allow 1 minor version difference
- ex. Allow 13.0 KDK on 13.1
## 0.5.0 ## 0.5.0
- Ventura Specific Updates: - Ventura Specific Updates:

View File

@@ -140,7 +140,7 @@ class kernel_debug_kit_handler:
kdk_version = cast(packaging.version.Version, packaging.version.parse(kdk["version"])) kdk_version = cast(packaging.version.Version, packaging.version.parse(kdk["version"]))
if kdk["build"] == build: if kdk["build"] == build:
download_link = kdk["url"] download_link = kdk["url"]
elif not closest_match_download_link and kdk_version <= parsed_version and kdk_version.major == parsed_version.major and kdk_version.minor == parsed_version.minor: elif not closest_match_download_link and kdk_version <= parsed_version and kdk_version.major == parsed_version.major and (kdk_version.minor == parsed_version.minor or kdk_version.minor == parsed_version.minor - 1):
# The KDK list is already sorted by date then version, so the first match is the closest # The KDK list is already sorted by date then version, so the first match is the closest
closest_match_download_link = kdk["url"] closest_match_download_link = kdk["url"]
closest_version = kdk["version"] closest_version = kdk["version"]