r-darwish / topgrade

Upgrade everything
GNU General Public License v3.0
3.36k stars 161 forks source link

Replace the apt step with nala if installed. #914

Closed r-darwish closed 2 years ago

r-darwish commented 2 years ago

Fixes #897

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.

r-darwish commented 2 years ago

@RayJW can you please test this branch?

RayJW commented 2 years ago

At the moment, it updates the sources with nala update however it fails at:

Usage: nala [OPTIONS] COMMAND [ARGS]...
Try 'nala -h' for help.

Error: No such command 'dist-upgrade'.

This is because the commands don't map 1 to 1 with apt. It would be sufficient to just run nala upgrade as this updates the sources before running a system upgrade.

More information: https://salsa.debian.org/volian-team/nala/-/blob/main/docs/nala.8.md

r-darwish commented 2 years ago

@RayJW I pushed a fix. Can you please try again?

RayJW commented 2 years ago

@r-darwish The upgrade process now works, however since upgrade also involves an update, the sources now get updated twice which is a waste of time. The easiest solution would be to run sudo nala upgrade --no-update so there don't have to be more checks to decide if running an update is necessary. Alternatively, sudo nala update can be skipped and only upgrade without any flags should be run. Either solution would work.

r-darwish commented 2 years ago

@r-darwish The upgrade process now works, however since upgrade also involves an update, the sources now get updated twice which is a waste of time. The easiest solution would be to run sudo nala upgrade --no-update so there don't have to be more checks to decide if running an update is necessary. Alternatively, sudo nala update can be skipped and only upgrade without any flags should be run. Either solution would work.

I pushed a fix to that as well

RayJW commented 2 years ago

@r-darwish Everything works as expected now. Maybe it would actually make sense to use the second solution of skipping sudo nala update and then run sudo nala upgrade because now the message reporting how many updates are available is duplicated. However, this is more of an improvement and not critical. Thanks for your work either way!

r-darwish commented 2 years ago

Pushed another fix for that as well. Please try again.

RayJW commented 2 years ago

@r-darwish Now everything works like a charm. Thank you for your work!