pyinfra
pyinfra copied to clipboard
Use distro information in `server.packages` (apt would be picked over zypper)
https://github.com/Fizzadar/pyinfra/blob/c1c9437716c847f24d032543443ad7f483ac0931/pyinfra/operations/server.py#L520-L521
While this should work in general, I think this might deliver surprising results for example for openSUSE. An openSUSE install is shipping aptitude with a symlink to apt. But apt might behave different from zypper, which most people would expect to be invoked in this case.
Checking the distribution version with distro might deliver more reliable results.
Hi @brejoc! Thank you for reporting this, indeed zypper
should be preferred on openSUSE. The issue with distro mapping is maintenance, although perhaps a combination of mapping with fallback as existing makes sense.
I'm going to push a quick fix for this as-is by re-ordering so zypper
is preferred and leave this issue open to track the distro based improvement.