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:
@@ -16,7 +16,7 @@ import pytest
|
||||
if TYPE_CHECKING:
|
||||
from vocalinux.dbus_service import VocalinuxDBusService
|
||||
|
||||
# gi is mocked globally by conftest. All vocalinux imports are done lazily
|
||||
# gi is mocked globally by conftest. All voculinux imports are done lazily
|
||||
# inside the individual tests. Importing them at module level would bind their
|
||||
# `gi.repository` references at collection time and clash with test_main.py,
|
||||
# which replaces sys.modules["gi"] / sys.modules["gi.repository"] wholesale --
|
||||
@@ -35,7 +35,7 @@ def test_cli_flag_sends_matching_command(flag, command):
|
||||
from vocalinux.main import main
|
||||
|
||||
with patch("vocalinux.dbus_service.send_command", return_value=True) as mock_send:
|
||||
with patch.object(sys, "argv", ["vocalinux", flag]):
|
||||
with patch.object(sys, "argv", ["voculinux", flag]):
|
||||
with pytest.raises(SystemExit) as exc_info:
|
||||
main()
|
||||
assert exc_info.value.code == 0
|
||||
@@ -47,7 +47,7 @@ def test_cli_flag_exits_nonzero_when_no_instance():
|
||||
from vocalinux.main import main
|
||||
|
||||
with patch("vocalinux.dbus_service.send_command", return_value=False):
|
||||
with patch.object(sys, "argv", ["vocalinux", "--toggle"]):
|
||||
with patch.object(sys, "argv", ["voculinux", "--toggle"]):
|
||||
with pytest.raises(SystemExit) as exc_info:
|
||||
main()
|
||||
assert exc_info.value.code == 1
|
||||
@@ -58,7 +58,7 @@ def test_no_trigger_flag_does_not_dispatch():
|
||||
from vocalinux.main import main
|
||||
|
||||
# Mock single_instance via sys.modules (not patch("...acquire_lock")) so we
|
||||
# don't import the real module and set it as a vocalinux package attribute,
|
||||
# don't import the real module and set it as a voculinux package attribute,
|
||||
# which would defeat patch.dict-based single-instance tests elsewhere.
|
||||
mock_single_instance = MagicMock()
|
||||
mock_single_instance.acquire_lock.return_value = True
|
||||
@@ -66,7 +66,7 @@ def test_no_trigger_flag_does_not_dispatch():
|
||||
# check_dependencies returns False so main() exits early after dispatch.
|
||||
with patch.dict(sys.modules, {"vocalinux.single_instance": mock_single_instance}):
|
||||
with patch("vocalinux.main.check_dependencies", return_value=False):
|
||||
with patch.object(sys, "argv", ["vocalinux"]):
|
||||
with patch.object(sys, "argv", ["voculinux"]):
|
||||
with pytest.raises(SystemExit):
|
||||
main()
|
||||
mock_send.assert_not_called()
|
||||
@@ -269,7 +269,7 @@ def test_on_bus_acquired_handles_register_failure():
|
||||
# Patch GLib.Error to a real class so both the raise and the `except` clause
|
||||
# reference the same type and the GLib.Error branch is exercised.
|
||||
with patch.object(dbus_service.GLib, "Error", RuntimeError):
|
||||
service._on_bus_acquired(connection, "com.vocalinux.Vocalinux")
|
||||
service._on_bus_acquired(connection, "com.voculinux.Voculinux")
|
||||
|
||||
assert service._registration_id == 0
|
||||
|
||||
@@ -278,8 +278,8 @@ def test_name_acquired_and_lost_are_safe_to_call():
|
||||
"""The name-acquired/lost callbacks only log and never raise."""
|
||||
service = _make_service()
|
||||
connection = MagicMock()
|
||||
service._on_name_acquired(connection, "com.vocalinux.Vocalinux")
|
||||
service._on_name_lost(connection, "com.vocalinux.Vocalinux")
|
||||
service._on_name_acquired(connection, "com.voculinux.Voculinux")
|
||||
service._on_name_lost(connection, "com.voculinux.Voculinux")
|
||||
|
||||
|
||||
def test_invoke_swallows_callback_errors():
|
||||
|
||||
Reference in New Issue
Block a user