Suggestion for the system update script

I have a suggestion for the system update script. Have it test the connection to the repo’s using a single download and only redo the mirrors if below a certain threshhold. I know I tend to use yay most of the time since it testing all the download sites takes quite a while (I’m in a rural area so no blazing fast internet around here)

Another suggestion is to implement a check if the user is online and pause the script until internet is active again or you could make the user hit a button.

Testing the speed of the connection to the available mirrors is the part of running Rate Mirrors that takes the longest amount of time. That is to say, running a connection speed test to determine if you need to run Rate Mirrors (which also runs a connection speed test) is unlikely to speed up the process in an appreciable way.

That said, there really is no reason to resort the mirrors unless you are having issues with the list you are using (it’s too slow, or has bad mirrors, etc). If your mirrors are working fine, you can just skip the Rate Mirrors piece.

Garuda Update | Garuda Linux wiki

Usage

Simply use garuda-update or update in your shell of choice. Both commands do the same thing. Additionally, the following parameters are available:

Parameter Environment variable Description
–skip-mirrorlist SKIP_MIRRORLIST=1 Don’t update the mirrorlist before applying the system update.

Skip resorting the mirrors when updating by running garuda-update --skip-mirrorlist, or skip resorting the mirrors “permanently” by setting SKIP_MIRRORLIST=1 in /etc/garuda/garuda-update/config.

I’m not sure there is a way to “pause” an update if the connection is dropping, but Pacman does typically leave behind downloaded or partially downloaded files if a download fails. When you re-run the update, it will attempt to continue downloading the remaining files.

You can also run an update with the --disable-download-timeout option as described here: https://wiki.archlinux.org/title/Pacman/Tips_and_tricks#Installing_packages_on_bad_connection

Installing packages on bad connection

When trying to install a package from a bad connection (e.g. a train using a cell phone), use the --disable-download-timeout option to lessen the chance of receiving errors such as:

error: failed retrieving file […] Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds

or

error: failed retrieving file […] Operation timed out after 10014 milliseconds with 0 out of 0 bytes received

That may help prevent the update from failing if you have a spotty connection.

garuda-update --skip-mirrorlist -- --disable-download-timeout
6 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.