feat(identity): rename user-visible identity to voculinux with one-time legacy import
The fork takes its own name everywhere a user can see it: binaries (voculinux, voculinux-gui), desktop entry, autostart, tray, D-Bus namespace (com.voculinux.Voculinux, no alias for the old name), config/data/cache dirs, single-instance lock, IBus engine identity, tray icons, resource prefixes, VOCULINUX_* environment names, and the update-checker user agent. The internal Python module stays vocalinux and the distribution metadata keeps the upstream URLs as provenance. On first run a previous Vocalinux install's config.json, custom dictionary, and portal restore token are copied once into the new locations (new config always wins, no merge, no write-back); models re-resolve through the pinned-checksum download path. An offline naming-sweep test proves no old-name strings remain on user-visible surfaces outside the allowlist. Refs #18
This commit is contained in:
+7
-7
@@ -19,11 +19,11 @@ import pytest
|
||||
os.environ["PYTEST_RUNNING"] = "1"
|
||||
|
||||
# Isolate the whole test process from the developer's real desktop session
|
||||
# and Vocalinux state, mirroring a fresh CI runner:
|
||||
# and Voculinux state, mirroring a fresh CI runner:
|
||||
# * XDG base dirs point at a throwaway directory, so locally downloaded
|
||||
# models (~/.local/share/vocalinux/models) and the real config file
|
||||
# models (~/.local/share/voculinux/models) and the real config file
|
||||
# never leak into tests. This must happen at conftest import time:
|
||||
# vocalinux modules freeze paths like MODELS_DIR at first import during
|
||||
# voculinux modules freeze paths like MODELS_DIR at first import during
|
||||
# collection, before any fixture could run. The directory is shared for
|
||||
# the whole session on purpose — some tests rely on directories that
|
||||
# earlier tests created, exactly as they do on CI with the runner's HOME.
|
||||
@@ -31,7 +31,7 @@ os.environ["PYTEST_RUNNING"] = "1"
|
||||
# session flips IBus/keyboard code paths (issue #478) that CI never sees.
|
||||
# Tests that need specific values set them via patch.dict/monkeypatch, which
|
||||
# layer on top of this.
|
||||
_XDG_ISOLATION_DIR = tempfile.mkdtemp(prefix="vocalinux-pytest-xdg-")
|
||||
_XDG_ISOLATION_DIR = tempfile.mkdtemp(prefix="voculinux-pytest-xdg-")
|
||||
os.environ["XDG_DATA_HOME"] = os.path.join(_XDG_ISOLATION_DIR, "data")
|
||||
os.environ["XDG_CONFIG_HOME"] = os.path.join(_XDG_ISOLATION_DIR, "config")
|
||||
os.environ["XDG_CACHE_HOME"] = os.path.join(_XDG_ISOLATION_DIR, "cache")
|
||||
@@ -53,7 +53,7 @@ try:
|
||||
except ImportError:
|
||||
_real_numpy = None
|
||||
else:
|
||||
sys._vocalinux_real_numpy = _real_numpy
|
||||
sys._voculinux_real_numpy = _real_numpy
|
||||
|
||||
# And the same for zipfile: test_recognition_manager.py and
|
||||
# test_recognition_manager_download_buffer.py assign a MagicMock to
|
||||
@@ -62,7 +62,7 @@ else:
|
||||
# reachable for the ones that need it.
|
||||
import zipfile as _real_zipfile # noqa: E402
|
||||
|
||||
sys._vocalinux_real_zipfile = _real_zipfile
|
||||
sys._voculinux_real_zipfile = _real_zipfile
|
||||
|
||||
# Prevent specific known-blocking daemon threads from starting during tests.
|
||||
# Source code in ibus_engine.py and evdev_backend.py spawns daemon threads
|
||||
@@ -105,7 +105,7 @@ sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")
|
||||
|
||||
# Always mock GI/GTK modules before any test files are collected.
|
||||
# On CI, real gi (PyGObject) is installed via "pip install PyGObject" and
|
||||
# module-level imports in vocalinux source files (ibus_engine, tray_indicator,
|
||||
# module-level imports in voculinux source files (ibus_engine, tray_indicator,
|
||||
# settings_dialog, etc.) will trigger GTK initialization or IBus daemon
|
||||
# connections that hang indefinitely in headless environments.
|
||||
# pytest-timeout cannot interrupt these C-level blocking calls.
|
||||
|
||||
Reference in New Issue
Block a user