mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-02 14:28:54 -06:00
refactor: one installed-everywhere rule for needs
This commit is contained in:
1 parent
4185ad79ca
commit
38f81892ee
3 files changed
+11
-2
No files matched your search
@@ -13,6 +13,7 @@ from core.hashing import parse_hash_list
|
||||
from core.paths import REPO_ROOT
|
||||
from core.ziptools import is_archive_path, zip_members
|
||||
from resolve.content import size_fits
|
||||
from resolve.validation import installed_everywhere
|
||||
|
||||
|
||||
HASH_FIELDS = ("sha1", "md5", "sha256")
|
||||
@@ -67,7 +68,7 @@ def profile_needs(profiles: dict, db: dict) -> dict:
|
||||
continue
|
||||
# Installed with the emulator, so not an acquisition target,
|
||||
# unless a platform package leaves it out.
|
||||
if entry.get("bundled") and not entry.get("not_bundled_on"):
|
||||
if installed_everywhere(entry):
|
||||
continue
|
||||
need = {"emulator": emulator, "name": name,
|
||||
"required": bool(entry.get("required"))}
|
||||
|
||||
@@ -10,6 +10,7 @@ from model.platforms import load_platform_config
|
||||
from model.registry import list_registered_platforms
|
||||
from packs.consumers import FileConsumers
|
||||
from resolve.directories import expand_directory_entries
|
||||
from resolve.validation import installed_everywhere
|
||||
|
||||
|
||||
def _entries(profile: dict, db: dict) -> list[dict]:
|
||||
@@ -52,7 +53,7 @@ def bundled_only(db: dict, profiles: dict, platforms_dir: str, install_dir: Path
|
||||
# A platform whose package leaves the file out (not_bundled_on:
|
||||
# AmberELEC's amiberry 7.1.1 has no AROS ROMs) brings it from
|
||||
# the collection.
|
||||
if entry.get("bundled") and not entry.get("not_bundled_on"):
|
||||
if installed_everywhere(entry):
|
||||
bundled.setdefault(sha1, set()).add(emulator)
|
||||
else:
|
||||
needed.add(sha1)
|
||||
|
||||
Reference in new issue
Block a user