fix(install): resolve versioned python3-venv package; skip XFCE-only apt packages off XFCE

Newer distros drop the python3-venv transitional package once it no longer
resolves to a real pythonX.Y-venv candidate, which crashed sync.py's venv
creation with a raw traceback. Prep now resolves the exact versioned
package via apt-cache, and skips xfce4-genmon-plugin/plank/blueman on
boxes with no xfconf-query so a non-XFCE box doesn't get noisy "unable to
locate package" failures for a panel it'll never run. venv_python() also
fails with an actionable message instead of an uncaught CalledProcessError.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Jon Wingender
2026-07-30 08:44:56 -05:00
co-authored by Claude Sonnet 5
parent 6a9786bd03
commit 409e384be0
2 changed files with 31 additions and 4 deletions
+8 -1
View File
@@ -62,7 +62,14 @@ def venv_python() -> Path:
venv = ROOT / "Promethean"
py = venv / ("Scripts/python.exe" if os.name == "nt" else "bin/python")
if not py.exists():
subprocess.run([sys.executable, "-m", "venv", str(venv)], check=True)
result = subprocess.run([sys.executable, "-m", "venv", str(venv)])
if result.returncode:
raise SystemExit(
"\nvenv creation failed - the Python 'venv' module isn't usable here.\n"
"On Debian/Ubuntu this is usually a missing pythonX.Y-venv package; "
"check the 'Installing system packages' warning further up, install "
"it by hand, then re-run."
)
return py