fix(furtka): point DEFAULT_BUNDLED_APPS_DIR at /opt/furtka/current/apps
Some checks are pending
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
CI / validate-json (push) Waiting to run
CI / markdown-links (push) Waiting to run
Build ISO / build-iso (push) Successful in 17m5s

Third install-path miss from the versioned-layout refactor: the bundled
apps moved from /opt/furtka/apps (flat) to
/opt/furtka/versions/<ver>/apps/, reached through the /opt/furtka/current
symlink. paths.py was still pointing at the flat path, so _list_bundled
walked a non-existent directory and /api/bundled returned [] — the
fileshare tile never showed up on /apps.

Tests already use FURTKA_BUNDLED_APPS_DIR env override so nothing in
the suite needed to change. Confirmed on the VM: compat symlink
/opt/furtka/apps -> current/apps makes /api/bundled return the
fileshare manifest immediately, no service restart needed since
scanner.py reads the directory on every request.

Locking the path at current/apps rather than leaving the flat fallback
is deliberate — Phase-2 self-updates flip the symlink, and a flat
/opt/furtka/apps wouldn't move with them; bundled apps would freeze
at whatever version installed first.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Daniel Maksymilian Syrnicki 2026-04-16 15:58:10 +02:00
parent 19e72cf5c3
commit d3c512b14f

View file

@ -2,7 +2,11 @@ import os
from pathlib import Path from pathlib import Path
DEFAULT_APPS_DIR = Path("/var/lib/furtka/apps") DEFAULT_APPS_DIR = Path("/var/lib/furtka/apps")
DEFAULT_BUNDLED_APPS_DIR = Path("/opt/furtka/apps") # Bundled apps live alongside the Python package inside each versioned slot
# (/opt/furtka/versions/<ver>/apps/), reached via the /opt/furtka/current
# symlink. A flat /opt/furtka/apps path would break the Phase-2 self-update
# flow (symlink swap wouldn't move the bundled-app tree along with the code).
DEFAULT_BUNDLED_APPS_DIR = Path("/opt/furtka/current/apps")
def apps_dir() -> Path: def apps_dir() -> Path: