From 5cc45794f474d8f725d85f6efe8bf690049064b0 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Sat, 17 Oct 2026 15:06:04 +0200 Subject: [PATCH] docs: show installer runs as they really print --- platforms/_registry.yml | 5 +++-- tests/test_scraper_contract.py | 18 ++++++++++++++++++ wiki/adding-a-platform.md | 6 ++++-- wiki/first-install.md | 22 ++++++++++++++-------- wiki/getting-started.md | 2 +- wiki/installer.md | 13 +++++++------ wiki/tools.md | 1 + 7 files changed, 48 insertions(+), 19 deletions(-) diff --git a/platforms/_registry.yml b/platforms/_registry.yml index 019d5506..6b1c34da 100644 --- a/platforms/_registry.yml +++ b/platforms/_registry.yml @@ -287,8 +287,9 @@ platforms: # files there, not the one RetroArch's Windows and macOS builds see. case_insensitive_fs: false schedule: weekly - target_scraper: lakka_targets - target_source: https://buildbot.libretro.com/nightly/ + # No target list yet: Lakka builds its cores per device image, and no + # scraper reads those lists. + target_scraper: null install: detect: - os: linux diff --git a/tests/test_scraper_contract.py b/tests/test_scraper_contract.py index dc84325d..b261b34f 100644 --- a/tests/test_scraper_contract.py +++ b/tests/test_scraper_contract.py @@ -208,6 +208,24 @@ class RecalboxReadsItsSystemsInBatches(unittest.TestCase): self.assertEqual(len(cores), 120) +class EveryNamedScraperExists(unittest.TestCase): + """The registry named lakka_targets, a scraper no file defines: a refresh + of stale targets would have failed on its import.""" + + def test_registry_scrapers_are_modules(self): + import yaml # noqa: PLC0415 + + registry = yaml.safe_load((REPO_ROOT / "platforms" / "_registry.yml").read_text()) + scraper_dir = REPO_ROOT / "scripts" / "scraper" + for name, meta in registry["platforms"].items(): + with self.subTest(platform=name): + if meta.get("scraper"): + self.assertTrue((scraper_dir / f"{meta['scraper']}_scraper.py").is_file()) + if meta.get("target_scraper"): + self.assertTrue((scraper_dir / "targets" + / f"{meta['target_scraper']}_scraper.py").is_file()) + + class RetroPiePackageList(unittest.TestCase): """RetroPie states its packages, and nothing else states them for it.""" diff --git a/wiki/adding-a-platform.md b/wiki/adding-a-platform.md index a7e481a4..aeb15813 100644 --- a/wiki/adding-a-platform.md +++ b/wiki/adding-a-platform.md @@ -142,8 +142,10 @@ platforms: ``` A platform without a scraper (`scraper: null`, `schedule: null`) keeps its YAML -as a hand-maintained file. RetroPie is the example: it inherits RetroArch's -file set and has nothing of its own to fetch. +as a hand-maintained file. Every registered platform has a scraper today, so +none is edited by hand: RetroPie inherits RetroArch's file set and its scraper +writes the packages it builds, read from the `rp_module_id` of each +scriptmodule, and any manual change is overwritten on the next scrape. The `cores` field determines which emulator profiles are resolved for this platform. Three strategies exist: diff --git a/wiki/first-install.md b/wiki/first-install.md index 2c3a6199..dc261494 100644 --- a/wiki/first-install.md +++ b/wiki/first-install.md @@ -63,12 +63,15 @@ curl -fsSL https://raw.githubusercontent.com/Abdess/retrobios/main/install.sh | The first lines name what it found and where it will write: ``` -RetroBIOS +RetroBIOS 8c0e9c762d2f Detecting platform... Found Batocera at /userdata/bios ``` +The code after RetroBIOS identifies the installer: it is the start of the +SHA-256 the command checked before running it. + That path is the one thing worth reading twice. If it is not where the emulator keeps its BIOS files, stop with Ctrl+C and see the last section. @@ -78,22 +81,25 @@ Two phases follow. The first reads what is already in the folder, which takes a few minutes on a memory card because every file is hashed: ``` -Fetching file index for misterfpga... - 72 files (24.0 MB) +Fetching file index for batocera... + 12893 files (8.6 GB) Checking existing files... - 72/72 present (72 verified, 0 wrong hash) + 0/12893 present (0 verified, 0 wrong hash) ``` -On a first install those numbers are zeros, which is expected, not a fault. +On a first install the present count is zero, which is expected, not a fault. +On a later run it counts what is already there, and only the rest is +downloaded. A download of 1 GB or more is confirmed first +(`Download 8.6 GB to /userdata/bios? [Y/n]`). The second phase downloads what is missing, one line per file: ``` -Downloading 72 files (24.0 MB)... +Downloading 12893 files (8.6 GB)... Press Ctrl+C to stop. Running the same command again carries on from here. - [1/72] AtariLynx/boot.rom ok - [2/72] Astrocade/boot.rom ok + [1/12893] 3do_arcade_saot.bin ok + [2/12893] 3dobios.zip ok ``` Ctrl+C is safe at any point. Files already installed stay, and running the diff --git a/wiki/getting-started.md b/wiki/getting-started.md index 8a5dc0c6..7a6cf8a6 100644 --- a/wiki/getting-started.md +++ b/wiki/getting-started.md @@ -237,7 +237,7 @@ It ends on a count: ``` Checking existing files... - 1872/1872 present (1872 verified, 0 wrong hash) + 5865/5865 present (5865 verified, 0 wrong hash) All files up to date. ``` diff --git a/wiki/installer.md b/wiki/installer.md index 3b7d5c5c..cc804d3f 100644 --- a/wiki/installer.md +++ b/wiki/installer.md @@ -101,22 +101,23 @@ A run looks like this: ``` Fetching file index for retroarch... - 1872 files (5.5 GB) - Safety notice: 9 unavailable or unsafe entries omitted (1 required; not found: 9). + 5865 files (5.7 GB) Checking existing files... - 0/1872 present (0 verified, 0 wrong hash) - - 1872 files need downloading. + 0/5865 present (0 verified, 0 wrong hash) ``` +When the manifest leaves entries out (a file the collection cannot supply, or +one that failed a safety check), a `Safety notice:` line under the index count +says how many and why. + ## Choosing what to install By default the installer fetches everything the platform runs. At a terminal, after detection, it asks: ``` -Retroarch: 5861 files, 6.0 GB. +Retroarch: 5865 files, 5.7 GB. Enter) install everything i) only what the installed cores read: 102 files, 44.5 MB c) choose systems, cores and regions diff --git a/wiki/tools.md b/wiki/tools.md index c05238ac..3487836b 100644 --- a/wiki/tools.md +++ b/wiki/tools.md @@ -667,6 +667,7 @@ Located in `scripts/scraper/`. Each inherits `BaseScraper` and implements `fetch | `retrodeck_scraper` | component manifests | JSON per component | | `romm_scraper` | known_bios_files.json | JSON | | `rocknix_scraper` | rocknix-systems script | Python dict | +| `retropie_scraper` | RetroPie-Setup scriptmodules (`rp_module_id`, `rp_module_help`) and `retropie_packages.sh` (version) | Bash | | `misterfpga_scraper` | BiosDB_MiSTer bios_db.json.zip | JSON in ZIP | | `coreinfo_scraper` | .info files from libretro-core-info | INI-like | | `bizhawk_scraper` | FirmwareDatabase.cs | C# source |