mirror of
https://github.com/storytold/craft-launcher.git
synced 2026-11-16 23:24:31 +00:00
The launcher offered a .deb whenever apt-get and dpkg were on PATH, and an .rpm only when dpkg was absent. Fedora can have apt and dpkg installed (mmdebstrap and friends pull them in), so there it downloaded the .deb and ran apt-get on it, with .rpm ruled out entirely (#21). The distro family now comes from ID and ID_LIKE in /etc/os-release: Debian and Ubuntu get .deb, Fedora, RHEL, CentOS, SUSE and openSUSE get .rpm, each only with pkexec and the matching tools. Arch and unknown distros get no system package. After the distro's package, AppImage now ranks ahead of Flatpak, whose bundles need a Flathub runtime. Installing a .deb without apt-get fails with a clear message, and removing one falls back to dpkg -r. The parsing and the choice are pure functions in core's new distro module, tested for Fedora, Rocky, openSUSE, Ubuntu, Mint, Arch and an unknown distro. Fixes #21 Co-authored-by: Fabio Lussi <198260595+itrycodinganditsbad@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>