erplibre/script/todo
Mathieu Benoit cd8c32b5b2 [IMP] qemu ssh: show the nesting chain in virt-manager too
A nested QEMU host appeared in virt-manager under its bare name, so nothing
said which machine it lived inside. It now carries the same « parent+child »
chain the ssh aliases use, at two levels of defence:

- the connection URI uses the CHAINED alias, so even a virt-manager that
  ignores custom labels shows the nesting in the host part;
- pretty-name is set explicitly, which is the label virt-manager actually
  displays.

pretty-name lives in a RELOCATABLE GSettings schema,
org.virt-manager.virt-manager.connection, one path per connection. The path is
built with no escaping at all: virt-manager just deletes every « / » from the
URI and uses the rest verbatim (virtManager/config.py, _make_perconn_key), so
qemu+ssh://erplibre@a+b/system becomes conns/qemu+ssh:erplibre@a+bsystem/.

That was verified for real rather than assumed: virt-manager is not installed
here, so its gschema was fetched from the distribution package, compiled into
a temporary schema dir, and the set/get/reset round trip run against it with a
genuinely chained URI — colons, @ and + all survive the dconf path. The key
was reset afterwards; nothing was left in dconf.

Making the URI carry the chain needs the chained name to resolve, so a nested
host is now written as « Host <short> <parent+child> » — ONE block, two names,
since ssh accepts several patterns on a Host line. The short name stays for
typing and is still only kept when free; the chain is always there. Checked
with ssh -G: both names yield the same HostName and ProxyJump, and a third
level chains as a+b+c. libvirt was checked too — it hands the URI host to ssh
untouched, + included.

Replacing a block by name meant a regex that could not see a Host line
carrying several names, which would have left the same name defined twice —
ssh honours the first, so an update would silently not apply. Removal now
parses the file into blocks and drops any whose name list intersects the new
one. Verified on a config with a global directive, a Match block and a
multi-name Host: only the targeted block goes, rewriting twice is idempotent,
and an unknown name leaves the file byte-identical.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-02 02:18:58 -04:00
..
database_manager.py [IMP] todo: add erase-database menu command 2026-06-25 02:37:22 -04:00
kdbx_manager.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
logo_ascii.txt [IMP] bot assistant TODO 2025-04-27 02:40:20 -04:00
migration_form.py [ADD] migration: a TUI resume screen, same first question as the prompt 2026-08-01 06:38:31 -04:00
qemu_deploy_form.py [FIX] qemu form: tick nothing in the catalog by default 2026-08-01 06:27:25 -04:00
qemu_install_monitor.py [ADD] qemu: statistics screen, with reset — and record failures too 2026-08-01 05:16:27 -04:00
README.base.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
README.fr.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
README.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
source_todo.sh [UPD] TODO: auto installation 2025-10-31 01:33:34 -04:00
todo.json [IMP] script todo: add QEMU/KVM VM deploy menu 2026-07-15 11:48:12 +00:00
todo.py [IMP] qemu ssh: show the nesting chain in virt-manager too 2026-08-02 02:18:58 -04:00
todo_example.json [UPD] TODO: simplify code by reusing method and support same command 2025-04-28 00:35:27 -04:00
todo_file_browser.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
todo_i18n.py [FIX] qemu ssh: only offer virt-manager the hosts that run QEMU 2026-08-02 02:03:05 -04:00
todo_prefs.py [ADD] migration: a TUI resume screen, same first question as the prompt 2026-08-01 06:38:31 -04:00
todo_telemetry.py [FIX] télémétrie navigation : extraire les commandes des menus « choices » 2026-07-30 23:24:40 -04:00
todo_upgrade.py [FIX] migration: tell modules with no code from those to uninstall 2026-08-01 07:16:26 -04:00
version_manager.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00

TODO is an assistant robot to use ERPLibre Execute it with ./script/todo/todo.py or make todo.

For a new project, copy todo_example.json to private/todo/todo_override.json | private/todo/todo_override_private.json and edit it.