mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-13 20:28:21 +10:00
Merge branch 'main' into sequoia-development
This commit is contained in:
@@ -200,9 +200,12 @@ class CatalogProducts:
|
||||
if len(supported_versions) == 4:
|
||||
break
|
||||
|
||||
# invert the list
|
||||
# Invert the list
|
||||
supported_versions = supported_versions[::-1]
|
||||
|
||||
# Create duplicate product list
|
||||
products_copy = products.copy()
|
||||
|
||||
# Remove all but the newest version
|
||||
for version in supported_versions:
|
||||
_newest_version = packaging.version.parse("0.0.0")
|
||||
@@ -229,7 +232,7 @@ class CatalogProducts:
|
||||
continue
|
||||
try:
|
||||
if packaging.version.parse(installer["Version"]) < _newest_version:
|
||||
products.remove(installer)
|
||||
products_copy.pop(products_copy.index(installer))
|
||||
except packaging.version.InvalidVersion:
|
||||
pass
|
||||
|
||||
@@ -238,14 +241,17 @@ class CatalogProducts:
|
||||
if installer["Catalog"] in [SeedType.CustomerSeed, SeedType.DeveloperSeed, SeedType.PublicSeed]:
|
||||
for installer_2 in products:
|
||||
if installer_2["Version"].split(".")[0] == installer["Version"].split(".")[0] and installer_2["Catalog"] not in [SeedType.CustomerSeed, SeedType.DeveloperSeed, SeedType.PublicSeed]:
|
||||
products.remove(installer)
|
||||
if installer in products_copy:
|
||||
products_copy.pop(products_copy.index(installer))
|
||||
|
||||
|
||||
# Remove EOL versions (older than n-3)
|
||||
for installer in products:
|
||||
if installer["Version"].split(".")[0] < supported_versions[-4].value:
|
||||
products.remove(installer)
|
||||
if installer in products_copy:
|
||||
products_copy.pop(products_copy.index(installer))
|
||||
|
||||
return products
|
||||
return products_copy
|
||||
|
||||
|
||||
@cached_property
|
||||
|
||||
Reference in New Issue
Block a user