From 6015552fb288e2d36d6616609cc475f8f489ea7b Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 6 Nov 2026 03:58:38 +0100 Subject: [PATCH] fix: offer Lakka's card route from Linux only Lakka keeps /storage on the card's ext4 partition (Lakka-LibreELEC 4696b48f scripts/mkimage:72, 95), which Windows and macOS do not open, and its page offered them a card route. card_run is now [linux], and a page with no Windows route says only Linux opens the card. --- platforms/_guides.yml | 6 ++++-- scripts/generate_site.py | 6 +++++- tests/test_site_entry.py | 13 +++++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/platforms/_guides.yml b/platforms/_guides.yml index 4353b6ccc..371507733 100644 --- a/platforms/_guides.yml +++ b/platforms/_guides.yml @@ -452,6 +452,9 @@ guides: Turn on **SSH**, a terminal over the network, in Lakka's **Settings > Services**. From a computer, connect with `ssh root@lakka`, password `root`. Paste the line. Press Enter. + # /storage is the card's ext4 partition, the other one FAT32 (Lakka-LibreELEC + # 4696b48f, scripts/mkimage:71-72 and 95): from a computer, only Linux opens it. + card_run: [linux] reference_notes: - The folder is reachable over SSH and over the network share. pack_manual: | @@ -648,8 +651,7 @@ guides: RetroPie also installs standalone emulators (openMSX, PCSX2, XRoar, Amiberry and others) whose files only the RetroPie file list carries. - >- - RetroPie is archived in this project: the command serves it, and checks that cover - every setup include it only on request. + RetroPie is archived here: checks of every setup include it only on request. pack_manual: | Option B: Via network share -------------------------- diff --git a/scripts/generate_site.py b/scripts/generate_site.py index 79d23238c..ccd8e4a05 100644 --- a/scripts/generate_site.py +++ b/scripts/generate_site.py @@ -4188,7 +4188,11 @@ def _card_route(name: str, display: str, guide: Guide) -> list[str]: lead = ("No network here? Run the command on a computer that has one, with a USB " f"drive's folder after `--dest`. Then copy it into {_folder_words(display, extract_to)}.") return [lead, "", *terminal_tabs(tabs, args, steps=False)] - lead = ("No network? Put the device's card in your computer. After `--dest`, " + # A folder on the card's Linux partition: Windows and macOS show the + # small boot partition alone, and no folder there fits --dest. + put = ("Put the device's card in your computer." if "windows" in tabs + else "Only a Linux computer opens the card.") + lead = (f"No network? {put} After `--dest`, " f"name the folder the device calls `{extract_to}`.") return [lead, "", *terminal_tabs(tabs, args, steps=False), f"[More on SD cards](../{CARD_ROUTE_FAQ})", ""] diff --git a/tests/test_site_entry.py b/tests/test_site_entry.py index 032f5d67d..18e9b27b0 100644 --- a/tests/test_site_entry.py +++ b/tests/test_site_entry.py @@ -937,6 +937,19 @@ class ARouteWithoutANetwork(unittest.TestCase): self.assertEqual(_tab_labels(card), set()) self.assertIn("**Linux**", card) + def test_a_linux_partition_card_says_why_and_offers_linux_alone(self): + """Lakka's /storage is the card's ext4 partition (Lakka-LibreELEC + scripts/mkimage): its page offered Windows and macOS tabs for a + folder neither can open.""" + for name in ("lakka", "retropie"): + with self.subTest(setup=name): + self.assertEqual(siteguides.GUIDES[name].card_run, ("linux",)) + card = _plain_page(f"platforms/{name}.md").split("No network?", 1)[1] + card = card.split("## On the device", 1)[0] + self.assertEqual(_tab_labels(card), set()) + self.assertNotIn("E:\\", card) + self.assertIn("Only a Linux computer opens the card.", card) + def test_no_zip_is_promised_for_an_unmarked_setup(self): for name in SETUPS: if REGISTRY[name].get("release_pack") is True: