From 349914fda28ba4f4549564aabfbb5804f84a31ca Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 6 Nov 2026 03:16:00 +0100 Subject: [PATCH] fix: list boards offline from the given list --list-targets offline was refused, and its advice to give --manifest or --from-pack was refused in turn. It now reads the boards where --target reads them: the pack's list or targets/.json beside --manifest. --- install.ps1 | 2 +- install.py | 5 +++-- install.sh | 2 +- install/launchers/index.json | 16 ++++++++-------- tests/test_install_offline.py | 15 +++++++++++++++ 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/install.ps1 b/install.ps1 index f1c93ca4c..caa70f050 100644 --- a/install.ps1 +++ b/install.ps1 @@ -16,7 +16,7 @@ # and Invoke-WebRequest throws on a cut transfer before the hash is read: # the site's build rewrites this line there (scripts/sitebootstrap.py). $mismatchAdvice = "The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that." - $defaultInstallSha256 = "d9b9e08c5a3ff983f8bb440512edd0c68e33493ff6c3c5b119dfe72582b3a3d1" + $defaultInstallSha256 = "8e1b953a928a794c79d73105dc4b45dccd5a2f55651f8a262ac51783352f16c1" $maximumInstallerBytes = 2MB $installerExit = 0 $installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null } diff --git a/install.py b/install.py index 0f61a0b21..ec50d19a4 100644 --- a/install.py +++ b/install.py @@ -13451,9 +13451,10 @@ def main() -> None: ): parser.error("--from copies files into the BIOS folder, which a listing " "does not write") - if (args.from_pack or args.manifest) and (args.list_platforms or args.list_targets): + if (args.from_pack or args.manifest) and args.list_platforms: + # --list-targets reads its boards from them, where --target does. parser.error("--from-pack and --manifest give a file list, which --list-platforms " - "and --list-targets do not read") + "does not read") if args.no_game_data and (args.list_platforms or args.list_targets): parser.error("--no-game-data narrows a file list, not --list-platforms " "or --list-targets") diff --git a/install.sh b/install.sh index 2cdd22977..befed61da 100755 --- a/install.sh +++ b/install.sh @@ -23,7 +23,7 @@ DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/ins # curl or wget stop on a cut transfer before the hash is read: the site's # build rewrites this line there (scripts/sitebootstrap.py). MISMATCH_ADVICE="The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that." -DEFAULT_INSTALL_SHA256="d9b9e08c5a3ff983f8bb440512edd0c68e33493ff6c3c5b119dfe72582b3a3d1" +DEFAULT_INSTALL_SHA256="8e1b953a928a794c79d73105dc4b45dccd5a2f55651f8a262ac51783352f16c1" MAX_INSTALLER_BYTES=2097152 cleanup() { diff --git a/install/launchers/index.json b/install/launchers/index.json index be5af75db..414cef37b 100644 --- a/install/launchers/index.json +++ b/install/launchers/index.json @@ -27,8 +27,8 @@ { "dest": "roms/ports/retrobios/install.py", "repo_path": "install.py", - "size": 1098257, - "sha256": "d9b9e08c5a3ff983f8bb440512edd0c68e33493ff6c3c5b119dfe72582b3a3d1", + "size": 1098291, + "sha256": "8e1b953a928a794c79d73105dc4b45dccd5a2f55651f8a262ac51783352f16c1", "executable": false }, { @@ -71,8 +71,8 @@ "muos": { "archive": { "dest": "ARCHIVE/RetroBIOS.muxapp", - "size": 1151884, - "sha256": "54ff79a8c51879532db206bb24dd7b3a884a2c8de1d3bcc07f1a2d4f66084c71" + "size": 1151918, + "sha256": "4981792f43dd11f8bb09f0c9981abe721934a84d5d8a49c05bfca44d736ddd83" }, "members": [ { @@ -92,8 +92,8 @@ { "name": "RetroBIOS/install.py", "repo_path": "install.py", - "size": 1098257, - "sha256": "d9b9e08c5a3ff983f8bb440512edd0c68e33493ff6c3c5b119dfe72582b3a3d1", + "size": 1098291, + "sha256": "8e1b953a928a794c79d73105dc4b45dccd5a2f55651f8a262ac51783352f16c1", "executable": false }, { @@ -166,8 +166,8 @@ { "dest": ".config/modules/retrobios/install.py", "repo_path": "install.py", - "size": 1098257, - "sha256": "d9b9e08c5a3ff983f8bb440512edd0c68e33493ff6c3c5b119dfe72582b3a3d1", + "size": 1098291, + "sha256": "8e1b953a928a794c79d73105dc4b45dccd5a2f55651f8a262ac51783352f16c1", "executable": false }, { diff --git a/tests/test_install_offline.py b/tests/test_install_offline.py index 04b3ab018..dd6849439 100644 --- a/tests/test_install_offline.py +++ b/tests/test_install_offline.py @@ -463,6 +463,21 @@ class ABoardWithoutTheNetwork(Scratch): self.assertEqual(proc.returncode, 0, proc.stdout + proc.stderr) self.assertIn("for target psx-board", proc.stdout) + def test_the_boards_are_listed_from_where_target_reads_them(self): + """Offline, the refusal of --list-targets named --manifest, and + --manifest with --list-targets was refused: no form listed a board.""" + (self.root / "targets").mkdir() + (self.root / "targets" / "retroarch.json").write_text(json.dumps(BOARDS)) + _carrying(self.pack, {"install_list": manifest(), "targets": BOARDS}) + for given in (["--offline", "--manifest", str(self.list)], + ["--from-pack", str(self.pack)]): + with self.subTest(given=given[-1]): + proc = self.run_installer(*given, "--list-targets", "--no-input") + self.assertEqual(proc.returncode, 0, proc.stdout + proc.stderr) + for board in BOARDS: + self.assertIn(f" {board} (", proc.stdout) + self.assertFalse(self.dest.exists()) + def test_a_pack_without_a_list_says_why(self): proc = self.run_installer("--from-pack", str(self.pack), "--target", "gba-board", "--no-input")