Refactor: Detect package manager instead of distro in installer#67
Conversation
Replace distro-based dependency detection with package manager detection for broader Linux distribution support. This automatically enables support for derivative distros (Linux Mint, Pop!_OS, Rocky Linux, etc.) without needing to enumerate each one. Added support for: - pacman (Arch, Manjaro, EndeavourOS) - zypper (openSUSE, SUSE) - apk (Alpine Linux) MSYS2 detection remains unchanged (via uname -s check before package manager detection). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR refactors the Linux dependency installer to detect package managers instead of specific distros, automatically supporting derivative distributions without enumeration.
Changes:
- Replaced
/etc/os-releasedistro ID detection withcommand -vpackage manager detection - Added support for pacman (Arch-based), zypper (openSUSE/SUSE), and apk (Alpine Linux)
- Removed
python3-venvfrom yum/dnf installers
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| gcc gcc-c++ make cmake \ | ||
| python3 python3-devel python3-pip python3-venv \ | ||
| && yum clean all | ||
| python3 python3-devel python3-pip \ |
There was a problem hiding this comment.
The removal of python3-venv from yum-based installations could break functionality if virtual environments are required elsewhere in the installation process. Verify that virtual environment creation is not needed, or restore python3-venv to maintain consistency with the original implementation.
| python3 python3-devel python3-pip \ | |
| python3 python3-devel python3-pip python3-venv \ |
| gcc gcc-c++ make cmake \ | ||
| python3 python3-devel python3-pip python3-venv \ | ||
| && dnf clean all | ||
| python3 python3-devel python3-pip \ |
There was a problem hiding this comment.
The removal of python3-venv from dnf-based installations could break functionality if virtual environments are required elsewhere in the installation process. Verify that virtual environment creation is not needed, or restore python3-venv to maintain consistency with the original implementation.
| python3 python3-devel python3-pip \ | |
| python3 python3-devel python3-pip python3-venv \ |
Restores python3-venv package to ensure venv module is available on minimal/container images where it may not be bundled with python3. Better to fail early with clear package error than later at venv creation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
/etc/os-releaseID check) with package manager detection (command -v)Problem
The installer failed on Linux Mint and other derivative distros:
Solution
Detect the package manager instead of the distro ID:
MSYS2 Compatibility
MSYS2 detection remains unchanged - it is checked first via
uname -s(returnsMSYS*/MINGW*) before any package manager detection, so MSYS2's pacman never conflicts with Linux pacman.Test plan
🤖 Generated with Claude Code