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:
@@ -10,7 +10,7 @@ import sys
|
||||
import unittest
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
# Mock GI imports before importing any vocalinux modules that use gi.
|
||||
# Mock GI imports before importing any voculinux modules that use gi.
|
||||
# On CI, real gi/IBus may be installed; importing ibus_engine without mocks
|
||||
# would set IBUS_AVAILABLE=True and VocalinuxEngine would inherit from real
|
||||
# IBus.Engine, causing hangs when super().__init__() tries to connect to IBus.
|
||||
@@ -31,7 +31,7 @@ sys.modules["gi.repository"] = _mock_gi_repo
|
||||
|
||||
# Force reload ibus_engine so it picks up mocks (in case it was already imported)
|
||||
for _key in list(sys.modules.keys()):
|
||||
if "vocalinux" in _key and "ibus_engine" in _key:
|
||||
if "voculinux" in _key and "ibus_engine" in _key:
|
||||
del sys.modules[_key]
|
||||
|
||||
|
||||
@@ -323,8 +323,8 @@ class TestSwitchEngine(unittest.TestCase):
|
||||
"""Test successfully switching engines."""
|
||||
from vocalinux.text_injection.ibus_engine import switch_engine
|
||||
|
||||
mock_get_engine.return_value = "vocalinux"
|
||||
result = switch_engine("vocalinux")
|
||||
mock_get_engine.return_value = "voculinux"
|
||||
result = switch_engine("voculinux")
|
||||
self.assertTrue(result)
|
||||
|
||||
@patch("vocalinux.text_injection.ibus_engine.get_current_engine")
|
||||
@@ -335,7 +335,7 @@ class TestSwitchEngine(unittest.TestCase):
|
||||
from vocalinux.text_injection.ibus_engine import switch_engine
|
||||
|
||||
mock_get_engine.return_value = "other"
|
||||
result = switch_engine("vocalinux")
|
||||
result = switch_engine("voculinux")
|
||||
self.assertFalse(result)
|
||||
|
||||
|
||||
@@ -381,7 +381,7 @@ class TestStopEngineProcess(unittest.TestCase):
|
||||
|
||||
cmdline = MagicMock()
|
||||
cmdline.exists.return_value = True
|
||||
cmdline.read_text.return_value = "python /x/vocalinux/text_injection/ibus_engine.py --ibus"
|
||||
cmdline.read_text.return_value = "python /x/voculinux/text_injection/ibus_engine.py --ibus"
|
||||
mock_path_cls.return_value = cmdline
|
||||
|
||||
# SIGTERM succeeds; first liveness check still alive; second gone.
|
||||
@@ -409,7 +409,7 @@ class TestStopEngineProcess(unittest.TestCase):
|
||||
|
||||
cmdline = MagicMock()
|
||||
cmdline.exists.return_value = True
|
||||
cmdline.read_text.return_value = "python /x/vocalinux/text_injection/ibus_engine.py --ibus"
|
||||
cmdline.read_text.return_value = "python /x/voculinux/text_injection/ibus_engine.py --ibus"
|
||||
mock_path_cls.return_value = cmdline
|
||||
|
||||
# SIGTERM, then keep reporting alive until wait timeout, then SIGKILL succeeds.
|
||||
|
||||
Reference in New Issue
Block a user