r-darwish / topgrade

Upgrade everything
GNU General Public License v3.0
3.35k stars 160 forks source link

Linux: System: Fix rpm-ostree detection #816

Closed Funky185540 closed 2 years ago

Funky185540 commented 2 years ago

On a rpm-ostree based system, topgrade would previously fail to detect the rpm-ostree executable and fall back to yum instead, which isn't available. This was caused by constructing a Path instance with Path::new, rather than querying the underlying OS for a path to the rpm-ostree executable.

Make the system update step use which to determine if an executable called "rpm-ostree" is available on the system and get the correct path to the executable.

Standards checklist:

If you developed a feature or a bug fix for someone else and you do not have the means to test it, please tag this person here.

I developed this code myself.