mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
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/<platform>.json beside --manifest.
This commit is contained in:
1 parent
b873c6a9fb
commit
349914fda2
5 files changed
+28
-12
No files matched your search
+1
-1
@@ -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 }
|
||||
|
||||
+3
-2
@@ -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")
|
||||
|
||||
+1
-1
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in new issue
Block a user