[garuda-update] Specifing the country when refreshing the mirror list

Hello,

I'm new, I'm liking Garuda, but I want to figure something out about the system update.
So for what I'm reading, at least from some posts, is that using pacman to update the system is not always the best because there are also some other packages that need to be solved specifically for this OS, so it seems that garuda-update(/usr/bin/garuda-update) is probably the one that should be used from my understanding. I'm having a bit of an issue here with this, because seems that the reflector is solving with the mirror list provided by mirror.cyberbits.asia which is unreachable in my country(Romania):

╭─[email protected] in ~ took 30ms
╰─λ ping mirror.cyberbits.asia
ping: connect: Network is unreachable

To solve this, I've edited the script and modified the following line in the refresh mirror section, by adding the country:

reflector --country Romania --latest 5 --age 2 --fastest 5 --protocol https --sort rate --save /etc/pacman.d/mirrorlist \
&& $INT && cat /etc/pacman.d/mirrorlist && echo "" \
&& pacman -Syy || { echo -e "\033[1;31m\nFailed to update mirrorlist\n\033[0m"; }
$INT

This solved my issue, update works with no problems. Reflector generated list:

################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################

# With:       reflector --country Romania --latest 5 --age 2 --fastest 5 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
# When:       2021-12-14 08:19:03 UTC
# From:       https://archlinux.org/mirrors/status/json/
# Retrieved:  2021-12-14 08:19:03 UTC
# Last Check: 2021-12-14 08:06:18 UTC

Server = https://mirror.flokinet.net/archlinux/$repo/os/$arch
Server = https://mirrors.nxthost.com/archlinux/$repo/os/$arch

Is this a bad idea? If not, and if it's a viable solution, should it not be added on the installation phase when specifying the country?

Thank you in advance!
Patrix

Update 1:
The warning received is perfectly fine, as long as a larger number is specified for --latest and --fastest.
After a little bit of investigation and reading the reflector documentation Reflector - ArchWiki I'd have to agree that the number of specified mirror lists is optimal(5), and it's probably not the best idea to specify a country for some cases. Take the following examples:

$ reflector --latest 10 --age 2 --fastest 10 --protocol https --sort rate --save ./test.mirrorlist
[2021-12-14 16:22:27] WARNING: failed to rate http(s) download (https://mirror.cyberbits.asia/archlinux/community/os/x86_64/community.db): <urlopen error [Er
rno 101] Network is unreachable>
$ cat ./test.mirrorlist
File: ./test.mirrorlist
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################

# With:       reflector --latest 10 --age 2 --fastest 10 --protocol https --sort rate --save ./test.mirrorlist
# When:       2021-12-14 14:22:51 UTC
# From:       https://archlinux.org/mirrors/status/json/
# Retrieved:  2021-12-14 14:22:25 UTC
# Last Check: 2021-12-14 14:07:57 UTC

Server = https://mirror.pkgbuild.com/$repo/os/$arch
Server = https://mirror.pseudoform.org/$repo/os/$arch
Server = https://archmirror.it/repos/$repo/os/$arch
Server = https://archlinux.uk.mirror.allworldit.com/archlinux/$repo/os/$arch
Server = https://phinau.de/arch/$repo/os/$arch
Server = https://mirror.cspacehostings.com/archlinux/$repo/os/$arch
Server = https://mirror.cyberbits.eu/archlinux/$repo/os/$arch
Server = https://archlinux.thaller.ws/$repo/os/$arch
Server = https://arlm.tyzoid.com/$repo/os/$arch
Server = https://mirror.cyberbits.asia/archlinux/$repo/os/$arch

But for some countries in Europe you can receive a lower number of mirror lists:

$ reflector --country Romania --latest 10 --age 2 --fastest 10 --protocol https --sort rate --save ./test.mirrorlist
$ cat ./test.mirrorlist
File: ./test.mirrorlist
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################

# With:       reflector --country Romania --latest 10 --age 2 --fastest 10 --protocol https --sort rate --save ./test.mirrorlist
# When:       2021-12-14 14:44:47 UTC
# From:       https://archlinux.org/mirrors/status/json/
# Retrieved:  2021-12-14 14:44:19 UTC
# Last Check: 2021-12-14 14:31:55 UTC

Server = https://mirror.flokinet.net/archlinux/$repo/os/$arch
Server = https://mirrors.nxthost.com/archlinux/$repo/os/$arch

Some are not so lucky, like Austria, Spain and others:

$ reflector --country Spain --latest 10 --age 2 --fastest 10 --protocol https --sort rate --save ./test.mirrorlist
error: no mirrors found

There is clearly room for improvement for this tool, it's not Garuda's fault, the team have made an excellent job. Especially when the reflector command throws an error like WARNING: failed to rate http(s) download (https://mirror.cyberbits.asia/archlinux/community/os/x86_64/community.db): <urlopen error [Er rno 101] Network is unreachable> but still adds mirror.cyberbits.asia it in the mirror list, which is bad but at least it adds it at the bottom of the list.

Please give the link, maybe you mean pamac?

???
I use alias

sudo reflector --country Germany --latest 5 --age 2 --fastest 5 --protocol https --sort rate --save /etc/pacman.d/mirrorlist && cat /etc/pacman.d/mirrorlist && sudo pacman -Syu

Normal use is

sudo pacman -Syu

Only if this not work use update or garuda-update.

BTW, welcome :slight_smile:

1 Like

Thank you, happy to be here! :smiley:

As mentioned in the topic, I did use the update-garuda script, only that I modified it to work for my country.
Line 37 in the /usr/bin/garuda-update script, to be more precise, you can see that no country is specified, so that's where I modified it to make it work for me.

It works for me, so :man_shrugging:
You are the first with this problem.

Work sudo pacman -Syu for you? :slight_smile:

@SGS, Patrix is referring to this post: [garuda-update] Specifing the country when refreshing the mirror list

Using Garuda update is indeed preferred whenever possible, I'll look into if I can make the reflector command more customizable.

3 Likes

Thank you for your response.
I'm not having an issue with the customization option, quite the contrary, I feel that the less customization, the better, at least for new users that are not experienced. Of course customization can be required by more advanced users, with proper documentation of course.

The issue I'm having is that in my particular case, the reflector is not solving with reachable mirrors. It's an anomaly, and it should not happen, but it is what it is.

So for user experience, the update button can be critical, which is in the Garuda Assistant application, and my guess is that it is using /usr/bin/garuda-update script. I think this is an awesome addition but I feel like it lacks dynamic behavior based on internet requirements, or maybe other elements that I'm not aware. I admit that I've not analyzed the entire script, so please treat this comment with a grain of salt.

For example: When I installed Garuda Linux, I was asked about my region, which is great and leads me to believe that the update will use mirror lists optimal for my region but I ran into this issue. Imagine how I felt when I attempted an update and this happens:

Refreshing mirrorlists using reflector, be patient please..
[2021-12-14 11:58:13] WARNING: failed to rate http(s) download (https://mirror.cyberbits.asia/archlinux/community/os/x86_64/community.db): <urlopen error [Er
rno 101] Network is unreachable>

I just learned today about the reflector command, and I feel like we can take advantage of it more than it is now. So like I mentioned before, what I modified in the script was to add a "--country Romania" in the reflector command, but I know that this might get overridden on the next update, and this is not a generic implementation. Maybe create a file garuda-update.conf and add a country property there. Say like:

echo "country=Romania" > garuda-update.conf
sed -n '/^country=/{s/^country=//;p}' garuda-update.conf
Romania

And use it in the reflector command:

reflector --country $(sed -n '/^country=/{s/^country=//;p}' <location_path>/garuda-update.conf) --latest 5 --age 2 --fastest 5 --protocol https --sort rate --save /etc/pacman.d/mirrorlist

Or something like this.

This is just my opinion. I love what you've done with Garuda Linux for arch based users, so keep at it and thank you for your contribution! :smiley:

Wait, just to confirm, the only thing wrong is that one warning? The script works perfectly fine but that one warning is a problem? Yeah I don't see a reason to fix that.

2 Likes

well anyway we will be using rate-mirrors starting next iso

2 Likes

I'm sorry, but I'd have to disagree. The whole purpose of refreshing the mirror list is to tell the system what external resources to use pre-update. If this fails, especially when a mirror list changes, then system is unable to update.

So I'm actually surprised why is this a warning and not an error.

Of course, I can just update using a custom reflector command that suits my needs, use pacman -Syyu and that's it, but then you wonder why does garuda-update exists in the first place.

Nope, around the world there is minimum one mirror not working for some reason, that does'nt break the update, never.

╭─[email protected] in ~ 
 ╰─λ update
[sudo] Passwort für sgs:    
:: Paketdatenbanken werden synchronisiert …
 core ist aktuell
 extra                                                                                                     1581,1 KiB  1196 KiB/s 00:01 [----------------------------------------------------------------------------------] 100%
 community                                                                                                    5,9 MiB  1864 KiB/s 00:03 [----------------------------------------------------------------------------------] 100%
 multilib                                                                                                   148,5 KiB   422 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 chaotic-aur                                                                                               1695,5 KiB  2,04 MiB/s 00:01 [----------------------------------------------------------------------------------] 100%
Abhängigkeiten werden aufgelöst …
Nach in Konflikt stehenden Paketen wird gesucht …

Pakete (1) garuda-update-1.5.1-1

Gesamtgröße des Downloads:             0,00 MiB
Gesamtgröße der installierten Pakete:  0,00 MiB
Größendifferenz der Aktualisierung:    0,00 MiB

:: Installation fortsetzen? [J/n] 
:: Pakete werden empfangen …
 garuda-update-1.5.1-1-any                                                                                    3,8 KiB  8,94 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
(1/1) Schlüssel im Schlüsselbund werden geprüft                                                                                         [----------------------------------------------------------------------------------] 100%
(1/1) Paket-Integrität wird überprüft                                                                                                   [----------------------------------------------------------------------------------] 100%
(1/1) Paket-Dateien werden geladen                                                                                                      [----------------------------------------------------------------------------------] 100%
(1/1) Auf Dateikonflikte wird geprüft                                                                                                   [----------------------------------------------------------------------------------] 100%
(1/1) Verfügbarer Festplattenspeicher wird ermittelt                                                                                    [----------------------------------------------------------------------------------] 100%
:: Pre-transaction-Hooks werden gestartet …
(1/1) Creating Timeshift snapshot before upgrade...
==> skipping timeshift-autosnap due SKIP_AUTOSNAP environment variable being set.
:: Paketänderungen werden verarbeitet …
(1/1) Aktualisiert wird garuda-update                                                                                                   [----------------------------------------------------------------------------------] 100%
:: Post-transaction-Hooks werden gestartet …
(1/7) Arming ConditionNeedsUpdate...
(2/7) Foreign/AUR package notification
gnome-encfs-manager-bin 1.8.19-3
paleofetch-git r186.8da48bd-1
zenmonitor3-git 83.8ebd281-1
(3/7) Orphaned package notification...
=> No orphans found.
(4/7) Checking for .pacnew and .pacsave files...
.pac* files found:
/etc/pacman.d/mirrorlist.pacnew
Please check and merge
(5/7) Updating pkgfile database...
(6/7) Checking which packages need to be rebuilt
(7/7) Syncing all file systems...

Refreshing mirrorlists using reflector, be patient please..
[2021-12-14 12:31:19] WARNING: failed to rate http(s) download (https://mirror.cyberbits.asia/archlinux/community/os/x86_64/community.db): <urlopen error [Errno 101] Network is unreachable>
[2021-12-14 12:31:29] WARNING: failed to rate http(s) download (https://mirror.lty.me/archlinux/community/os/x86_64/community.db): Download timed out after 5 second(s).
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################

# With:       reflector --latest 5 --age 2 --fastest 5 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
# When:       2021-12-14 11:31:32 UTC
# From:       https://archlinux.org/mirrors/status/json/
# Retrieved:  2021-12-14 11:31:19 UTC
# Last Check: 2021-12-14 11:14:17 UTC

Server = https://archlinux.thaller.ws/$repo/os/$arch
Server = https://mirror.f4st.host/archlinux/$repo/os/$arch
Server = https://mirror.cyberbits.eu/archlinux/$repo/os/$arch
Server = https://mirror.cyberbits.asia/archlinux/$repo/os/$arch
Server = https://mirror.lty.me/archlinux/$repo/os/$arch

:: Paketdatenbanken werden synchronisiert …
 core                                                                                                       137,7 KiB   732 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 extra                                                                                                     1581,1 KiB   864 KiB/s 00:02 [----------------------------------------------------------------------------------] 100%
 community                                                                                                    5,9 MiB   935 KiB/s 00:06 [----------------------------------------------------------------------------------] 100%
 multilib                                                                                                   148,5 KiB   766 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 chaotic-aur                                                                                               1695,5 KiB  1395 KiB/s 00:01 [----------------------------------------------------------------------------------] 100%

Checking for keyring update before starting full system update..
Warnung: garuda-hotfixes-1.0.4-1 ist aktuell -- Überspringe
Warnung: archlinux-keyring-20211028-1 ist aktuell -- Überspringe
Warnung: chaotic-keyring-20210617-2 ist aktuell -- Überspringe
 Es gibt nichts zu tun
:: Vollständige Systemaktualisierung wird gestartet …
Abhängigkeiten werden aufgelöst …
Nach in Konflikt stehenden Paketen wird gesucht …

Pakete (41) btrfs-assistant-git-0.8.r1.g4bdbaaf-1  garuda-common-settings-2.4.6-1  garuda-gamer-1.1.2-1  garuda-welcome-1.0.14-1  karchive-5.89.0-1  kauth-5.89.0-1  kbookmarks-5.89.0-1  kcodecs-5.89.0-1  kcompletion-5.89.0-1
            kconfig-5.89.0-1  kconfigwidgets-5.89.0-1  kcoreaddons-5.89.0-1  kcrash-5.89.0-1  kdbusaddons-5.89.0-1  kded-5.89.0-1  kglobalaccel-5.89.0-1  kguiaddons-5.89.0-1  ki18n-5.89.0-1  kiconthemes-5.89.0-1
            kio-5.89.0-1  kitemmodels-5.89.0-1  kitemviews-5.89.0-1  kjobwidgets-5.89.0-1  knotifications-5.89.0-1  kservice-5.89.0-1  ktextwidgets-5.89.0-1  kwallet-5.89.0-1  kwidgetsaddons-5.89.0-1  kwindowsystem-5.89.0-1
            kxmlgui-5.89.0-1  libmfx-21.3.5-1  libraqm-0.8.0-1  libxnvctrl-495.46-1  mujs-1.2.0-1  nvidia-settings-495.46-1  python-pyqt5-5.15.6-6  python-reportlab-3.6.3-1  qogir-gtk-theme-git-2021.11.17.r21.gc6cf34e-1
            sof-firmware-1.9.3-1  solid-5.89.0-1  sonnet-5.89.0-1

Gesamtgröße des Downloads:              52,38 MiB
Gesamtgröße der installierten Pakete:  182,87 MiB
Größendifferenz der Aktualisierung:     15,54 MiB

:: Installation fortsetzen? [J/n] 
:: Pakete werden empfangen …
 qogir-gtk-theme-git-2021.11.17.r21.gc6cf34e-1-any                                                           12,0 MiB  4,60 MiB/s 00:03 [----------------------------------------------------------------------------------] 100%
 garuda-gamer-1.1.2-1-any                                                                                     2,2 MiB  1328 KiB/s 00:02 [----------------------------------------------------------------------------------] 100%
 python-reportlab-3.6.3-1-x86_64                                                                              2,3 MiB   547 KiB/s 00:04 [----------------------------------------------------------------------------------] 100%
 python-pyqt5-5.15.6-6-x86_64                                                                                 4,2 MiB   813 KiB/s 00:05 [----------------------------------------------------------------------------------] 100%
 kwidgetsaddons-5.89.0-1-x86_64                                                                               4,7 MiB   893 KiB/s 00:05 [----------------------------------------------------------------------------------] 100%
 ki18n-5.89.0-1-x86_64                                                                                     1984,0 KiB  1403 KiB/s 00:01 [----------------------------------------------------------------------------------] 100%
 kio-5.89.0-1-x86_64                                                                                          7,7 MiB  1285 KiB/s 00:06 [----------------------------------------------------------------------------------] 100%
 kxmlgui-5.89.0-1-x86_64                                                                                   1732,2 KiB  1098 KiB/s 00:02 [----------------------------------------------------------------------------------] 100%
 kcoreaddons-5.89.0-1-x86_64                                                                               1344,0 KiB  1329 KiB/s 00:01 [----------------------------------------------------------------------------------] 100%
 kconfigwidgets-5.89.0-1-x86_64                                                                            1167,0 KiB  1275 KiB/s 00:01 [----------------------------------------------------------------------------------] 100%
 kconfig-5.89.0-1-x86_64                                                                                   1039,9 KiB  1452 KiB/s 00:01 [----------------------------------------------------------------------------------] 100%
 ktextwidgets-5.89.0-1-x86_64                                                                               869,5 KiB  1634 KiB/s 00:01 [----------------------------------------------------------------------------------] 100%
 solid-5.89.0-1-x86_64                                                                                      858,5 KiB  1346 KiB/s 00:01 [----------------------------------------------------------------------------------] 100%
 kwindowsystem-5.89.0-1-x86_64                                                                              783,3 KiB  2,40 MiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 nvidia-settings-495.46-1-x86_64                                                                            772,7 KiB  1961 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 sonnet-5.89.0-1-x86_64                                                                                     669,8 KiB  1533 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kservice-5.89.0-1-x86_64                                                                                   741,7 KiB  1605 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kcompletion-5.89.0-1-x86_64                                                                                639,4 KiB  1880 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kitemmodels-5.89.0-1-x86_64                                                                                635,1 KiB  2,46 MiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kbookmarks-5.89.0-1-x86_64                                                                                 603,9 KiB  2,31 MiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kitemviews-5.89.0-1-x86_64                                                                                 520,9 KiB  2,03 MiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 sof-firmware-1.9.3-1-x86_64                                                                                580,5 KiB  2,16 MiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kiconthemes-5.89.0-1-x86_64                                                                                520,4 KiB  1735 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kwallet-5.89.0-1-x86_64                                                                                    517,2 KiB  1616 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 knotifications-5.89.0-1-x86_64                                                                             487,7 KiB  2,04 MiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 karchive-5.89.0-1-x86_64                                                                                   380,9 KiB  2,24 MiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kcodecs-5.89.0-1-x86_64                                                                                    354,4 KiB  1926 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kguiaddons-5.89.0-1-x86_64                                                                                 316,3 KiB  1506 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kjobwidgets-5.89.0-1-x86_64                                                                                323,3 KiB  1525 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kauth-5.89.0-1-x86_64                                                                                      314,1 KiB  2,12 MiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kglobalaccel-5.89.0-1-x86_64                                                                               249,7 KiB  2,87 MiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 mujs-1.2.0-1-x86_64                                                                                        220,7 KiB  2,03 MiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kdbusaddons-5.89.0-1-x86_64                                                                                231,4 KiB  2,11 MiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kcrash-5.89.0-1-x86_64                                                                                     126,2 KiB  3,52 MiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 libxnvctrl-495.46-1-x86_64                                                                                  76,2 KiB  1588 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 libmfx-21.3.5-1-x86_64                                                                                      57,3 KiB   818 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 garuda-welcome-1.0.14-1-any                                                                                265,3 KiB   983 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 kded-5.89.0-1-x86_64                                                                                        56,1 KiB  1752 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 btrfs-assistant-git-0.8.r1.g4bdbaaf-1-x86_64                                                               184,4 KiB   768 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 libraqm-0.8.0-1-x86_64                                                                                      28,8 KiB   395 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 garuda-common-settings-2.4.6-1-any                                                                          55,8 KiB   254 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 Gesamt (41/41)                                                                                              52,4 MiB  5,82 MiB/s 00:09 [----------------------------------------------------------------------------------] 100%
(41/41) Schlüssel im Schlüsselbund werden geprüft                                                                                       [----------------------------------------------------------------------------------] 100%
(41/41) Paket-Integrität wird überprüft                                                                                                 [----------------------------------------------------------------------------------] 100%
(41/41) Paket-Dateien werden geladen                                                                                                    [----------------------------------------------------------------------------------] 100%
(41/41) Auf Dateikonflikte wird geprüft                                                                                                 [----------------------------------------------------------------------------------] 100%
(41/41) Verfügbarer Festplattenspeicher wird ermittelt                                                                                  [----------------------------------------------------------------------------------] 100%
:: Pre-transaction-Hooks werden gestartet …
(1/1) Creating Timeshift snapshot before upgrade...
Using system disk as snapshot device for creating snapshots in BTRFS mode
Mounted '/dev/nvme0n1p2' at '/run/timeshift/backup'
Creating new backup...(BTRFS)
Saving to device: /dev/nvme0n1p2, mounted at path: /run/timeshift/backup
Created directory: /run/timeshift/backup/timeshift-btrfs/snapshots/2021-12-14_12-32-12
Created subvolume snapshot: /run/timeshift/backup/timeshift-btrfs/snapshots/2021-12-14_12-32-12/@
Created control file: /run/timeshift/backup/timeshift-btrfs/snapshots/2021-12-14_12-32-12/info.json
BTRFS Snapshot saved successfully (0s)
Tagged snapshot '2021-12-14_12-32-12': ondemand
------------------------------------------------------------------------------

/dev/nvme0n1p2 is mounted at: /run/timeshift/backup, options: rw,relatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=5,subvol=/

------------------------------------------------------------------------------
Removing snapshot: 2021-12-12_18-56-30
Deleting subvolume: @ (Id:1207)
Deleted subvolume: @ (Id:1207)

Destroying qgroup: 0/1207
Destroyed qgroup: 0/1207

Deleted directory: /run/timeshift/backup/timeshift-btrfs/snapshots/2021-12-12_18-56-30
Removed snapshot: 2021-12-12_18-56-30
------------------------------------------------------------------------------
:: Paketänderungen werden verarbeitet …

Neue optionale Abhängigkeiten für qogir-gtk-theme-git
    qogir-icon-theme: Matching icon theme
(41/41) Aktualisiert wird sof-firmware                                                                                                  [----------------------------------------------------------------------------------] 100%
:: Post-transaction-Hooks werden gestartet …
( 1/15) Reloading system manager configuration...
( 2/15) Applying kernel sysctl settings...
Couldn't write '65536' to 'kernel/sched_interactivity_factor', ignoring: No such file or directory
Couldn't write '11000' to 'kernel/sched_max_lifetime_ms', ignoring: No such file or directory
( 3/15) Creating temporary files...
( 4/15) Reloading device manager configuration...
( 5/15) Arming ConditionNeedsUpdate...
( 6/15) Updating the MIME type database...
( 7/15) Reloading system bus configuration...
( 8/15) Foreign/AUR package notification
gnome-encfs-manager-bin 1.8.19-3
paleofetch-git r186.8da48bd-1
zenmonitor3-git 83.8ebd281-1
( 9/15) Updating icon theme caches...
(10/15) Orphaned package notification...
=> No orphans found.
(11/15) Checking for .pacnew and .pacsave files...
.pac* files found:
/etc/pacman.d/mirrorlist.pacnew
Please check and merge
(12/15) Updating pkgfile database...
(13/15) Checking which packages need to be rebuilt
(14/15) Updating the desktop file MIME type cache...
(15/15) Syncing all file systems...

Fixing any chaotic packages still depending on python39..

Zwischenspeicher-Verzeichnis: /var/cache/pacman/pkg/
:: Möchten Sie ALLE Dateien aus dem Zwischenspeicher entfernen? [j/N] 

Datenbank-Verzeichnis: /var/lib/pacman/
:: Möchten Sie ungenutzte Repositorien entfernen? [J/n] 
Ungenutzte Sync-Repositorien werden entfernt …
Warnung: flashfocus-git-v2.2.3.r5.g79dfb99-1 ist aktuell -- Reinstalliere
Warnung: gwe-0.15.4-1 ist aktuell -- Reinstalliere
Warnung: python-injector-0.18.4-1 ist aktuell -- Reinstalliere
Warnung: python-py3nvml-0.2.7-1 ist aktuell -- Reinstalliere
Warnung: python-pyparted-3.11.7-1 ist aktuell -- Reinstalliere
Warnung: qomui-git-0.8.2.r22.23650ab-2 ist aktuell -- Reinstalliere
Abhängigkeiten werden aufgelöst …
Nach in Konflikt stehenden Paketen wird gesucht …

Pakete (6) flashfocus-git-v2.2.3.r5.g79dfb99-1  gwe-0.15.4-1  python-injector-0.18.4-1  python-py3nvml-0.2.7-1  python-pyparted-3.11.7-1  qomui-git-0.8.2.r22.23650ab-2

Gesamtgröße des Downloads:              3,51 MiB
Gesamtgröße der installierten Pakete:   5,81 MiB
Größendifferenz der Aktualisierung:    -0,01 MiB

:: Installation fortsetzen? [J/n] 
:: Pakete werden empfangen …
 gwe-0.15.4-1-any                                                                                           168,9 KiB   469 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 flashfocus-git-v2.2.3.r5.g79dfb99-1-any                                                                     49,9 KiB   133 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 python-py3nvml-0.2.7-1-any                                                                                  91,7 KiB   218 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 python-pyparted-3.11.7-1-x86_64                                                                            111,6 KiB   248 KiB/s 00:00 [----------------------------------------------------------------------------------] 100%
 qomui-git-0.8.2.r22.23650ab-2-x86_64                                                                         3,1 MiB  3,41 MiB/s 00:01 [----------------------------------------------------------------------------------] 100%
 python-injector-0.18.4-1-any                                                                                39,4 KiB  76,5 KiB/s 00:01 [----------------------------------------------------------------------------------] 100%
 Gesamt (6/6)                                                                                                 3,5 MiB  3,54 MiB/s 00:01 [----------------------------------------------------------------------------------] 100%
(6/6) Schlüssel im Schlüsselbund werden geprüft                                                                                         [----------------------------------------------------------------------------------] 100%
(6/6) Paket-Integrität wird überprüft                                                                                                   [----------------------------------------------------------------------------------] 100%
(6/6) Paket-Dateien werden geladen                                                                                                      [----------------------------------------------------------------------------------] 100%
(6/6) Auf Dateikonflikte wird geprüft                                                                                                   [----------------------------------------------------------------------------------] 100%
(6/6) Verfügbarer Festplattenspeicher wird ermittelt                                                                                    [----------------------------------------------------------------------------------] 100%
:: Pre-transaction-Hooks werden gestartet …
(1/1) Creating Timeshift snapshot before upgrade...
Using system disk as snapshot device for creating snapshots in BTRFS mode

/dev/nvme0n1p2 is mounted at: /run/timeshift/backup, options: rw,relatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=5,subvol=/

Creating new backup...(BTRFS)
Saving to device: /dev/nvme0n1p2, mounted at path: /run/timeshift/backup
Created directory: /run/timeshift/backup/timeshift-btrfs/snapshots/2021-12-14_12-32-18
Created subvolume snapshot: /run/timeshift/backup/timeshift-btrfs/snapshots/2021-12-14_12-32-18/@
Created control file: /run/timeshift/backup/timeshift-btrfs/snapshots/2021-12-14_12-32-18/info.json
BTRFS Snapshot saved successfully (0s)
Tagged snapshot '2021-12-14_12-32-18': ondemand
------------------------------------------------------------------------------

/dev/nvme0n1p2 is mounted at: /run/timeshift/backup, options: rw,relatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=5,subvol=/

------------------------------------------------------------------------------
Removing snapshot: 2021-12-12_21-26-19
Deleting subvolume: @ (Id:1208)
Deleted subvolume: @ (Id:1208)

Destroying qgroup: 0/1208
Destroyed qgroup: 0/1208

Deleted directory: /run/timeshift/backup/timeshift-btrfs/snapshots/2021-12-12_21-26-19
Removed snapshot: 2021-12-12_21-26-19
------------------------------------------------------------------------------
:: Paketänderungen werden verarbeitet …
(1/6) Reinstalliert wird flashfocus-git                                                                                                 [----------------------------------------------------------------------------------] 100%
(2/6) Reinstalliert wird python-injector                                                                                                [----------------------------------------------------------------------------------] 100%
(3/6) Reinstalliert wird python-py3nvml                                                                                                 [----------------------------------------------------------------------------------] 100%
(4/6) Reinstalliert wird gwe                                                                                                            [----------------------------------------------------------------------------------] 100%
(5/6) Reinstalliert wird python-pyparted                                                                                                [----------------------------------------------------------------------------------] 100%
(6/6) Reinstalliert wird qomui-git                                                                                                      [----------------------------------------------------------------------------------] 100%
:: Post-transaction-Hooks werden gestartet …
( 1/12) Reloading system manager configuration...
( 2/12) Arming ConditionNeedsUpdate...
( 3/12) Reloading system bus configuration...
( 4/12) Foreign/AUR package notification
gnome-encfs-manager-bin 1.8.19-3
paleofetch-git r186.8da48bd-1
zenmonitor3-git 83.8ebd281-1
( 5/12) Compiling GSettings XML schema files...
( 6/12) Updating icon theme caches...
( 7/12) Orphaned package notification...
=> No orphans found.
( 8/12) Checking for .pacnew and .pacsave files...
.pac* files found:
/etc/pacman.d/mirrorlist.pacnew
Please check and merge
( 9/12) Updating pkgfile database...
(10/12) Checking which packages need to be rebuilt
(11/12) Updating the desktop file MIME type cache...
(12/12) Syncing all file systems...

Updating mlocate index..

Parsing man pages and writing completions to /home/sgs/.local/share/fish/generated_completions/
  4278 / 4278 : zramctl.8.gz                                        

Checking for plugin updates
Nothing to install / update

System updated! 🐧

 ╭─[email protected] in ~ took 1m24s

Here I got two

Refreshing mirrorlists using reflector, be patient please..
[2021-12-14 12:31:19] WARNING: failed to rate http(s) download (https://mirror.cyberbits.asia/archlinux/community/os/x86_64/community.db): <urlopen error [Errno 101] Network is unreachable>
[2021-12-14 12:31:29] WARNING: failed to rate http(s) download (https://mirror.lty.me/archlinux/community/os/x86_64/community.db): Download timed out after 5 second(s).
1 Like

I agree with you but you've just proven my point.
There are servers that are failing, but with a couple of tweaks you can minimize the risk of a failed update.
The tweak that I've done was to specify the country in my reflector command and this brought a working mirror list.
I understand that it's the reflectors responsibility with procuring the right mirror list, but let's take our changes into consideration. If I have a better change at getting a working mirror list by specifying the country in the reflector command, then why not take it?

On the other hand, let's assume that mirror.cyberbits.asia is working in Europe, but the download can suffer. Why not use the closest server to improve the download of updates? It's like asking me to play a multiplayer game on a server in America while I'm connecting from Europe, and the game is unplayable because of high ping.

Let's be realistic here, the mirror.cyberbits.asia has a geolocation in USA, and by specifying the country in reflector, the mirror list is solved using mirrors.nxthost.com which has a geolocation in Romania. So it's clear that it's doing it's job if used correctly. Of course, if this new mirror list still does not work, then I'm out of options and we can agree that there is nothing much to do if servers are not working.

This makes no sense.
Ranking mirrors by their performance is reflector's entire job. It literally found a not working mirror and removed it from the list too.
That mirror is never even added to your mirrorlist, so how can it possibly cause a failed update?

2 Likes

You are repeating what I'm saying. But:

You are not reading carefully. Also:

No, the domain mirror.cyberbits.asia was present in the /etc/pacman.d/mirrorlist even after the reflectore error:

[2021-12-14 11:58:13] WARNING: failed to rate http(s) download (https://mirror.cyberbits.asia/archlinux/community/os/x86_64/community.db): <urlopen error [Er
rno 101] Network is unreachable>

And I've had issues updating all Garuda related apps, but because I made the country change, then I was able to update them and unable to replicate the error so that you can see.

Interestingly enough, now if I revert garuda-update back to it's original content, now it's working. But it seems that the mirror list has changed again excluding mirror.cyberbits.asia:

╭─[email protected] in ~ took 38s
╰─λ cat /etc/pacman.d/mirrorlist
File: /etc/pacman.d/mirrorlist
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################

# With:       reflector --latest 5 --age 2 --fastest 5 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
# When:       2021-12-14 12:21:45 UTC
# From:       https://archlinux.org/mirrors/status/json/
# Retrieved:  2021-12-14 12:21:38 UTC
# Last Check: 2021-12-14 11:54:57 UTC

Server = https://mirror.chaoticum.net/arch/$repo/os/$arch
Server = https://mirror.f4st.host/archlinux/$repo/os/$arch
Server = https://mirror.cyberbits.eu/archlinux/$repo/os/$arch
Server = https://archlinux.thaller.ws/$repo/os/$arch
Server = https://mirror.lty.me/archlinux/$repo/os/$arch

So now, you can see that there is no mirror.cyberbits.asia. It seems that the reflector changed rankings. I'm literally frustrated at my self for not providing the right /etc/pacman.d/mirrorlist with the issue to prove my point. I can only use @SGS 's update command output to prove that it was eventually using mirror.cyberbits.asia.

Although, I can conclude that if an issue like this occurs, modifying line 37(at the time of this comment) in /usr/bin/garuda-update and specifying a country like mentioned above, solved my update.

I do stand by with what I said, also adding the possibility to switch to different countries when using the update functionality can be helpful.

I agree with you reflector includes failed mirrors.

You might want to change 5 to 10 if you aren't satisfied with your results.

2 Likes

Double checking the documentation using reflector --help base on your suggestion, which is a really good one and I've done a bit of testing. I've ran the following command:

reflector --country <country> --latest 5 --age 2 --fastest 5 --protocol https --sort rate --save ./test.mirrorlist

And funny enough is that for some countries, even tough you do specify 5, you'd still can get a lower number of mirror lists.
Just as a reference, for some Europe countries I get 2-3 mirror lists, for India I get 1 mirror list.
Every time you don't specify a country, you always get the specified number.

What I don't understand is this, take for example the following command:

╭─[email protected] in ~/test took 31ms
╰─λ reflector --latest 10 --age 2 --fastest 10 --protocol https --sort rate --save ./test.mirrorlist
[2021-12-14 16:22:45] WARNING: failed to rate http(s) download (https://mirror.cyberbits.asia/archlinux/community/os/x86_64/community.db): <urlopen error [Errno 101] Network is unreachable>

╭─[email protected] in ~/test took 8s
╰─λ cat ./test.mirrorlist
File: ./test.mirrorlist
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################

# With:       reflector --latest 10 --age 2 --fastest 10 --protocol https --sort rate --save ./test.mirrorlist
# When:       2021-12-14 14:22:51 UTC
# From:       https://archlinux.org/mirrors/status/json/
# Retrieved:  2021-12-14 14:22:25 UTC
# Last Check: 2021-12-14 14:07:57 UTC

Server = https://mirror.pkgbuild.com/$repo/os/$arch
Server = https://mirror.pseudoform.org/$repo/os/$arch
Server = https://archmirror.it/repos/$repo/os/$arch
Server = https://archlinux.uk.mirror.allworldit.com/archlinux/$repo/os/$arch
Server = https://phinau.de/arch/$repo/os/$arch
Server = https://mirror.cspacehostings.com/archlinux/$repo/os/$arch
Server = https://mirror.cyberbits.eu/archlinux/$repo/os/$arch
Server = https://archlinux.thaller.ws/$repo/os/$arch
Server = https://arlm.tyzoid.com/$repo/os/$arch
Server = https://mirror.cyberbits.asia/archlinux/$repo/os/$arch

You can clearly see that it added:

Server = https://mirror.cyberbits.asia/archlinux/$repo/os/$arch

Even tough the there was a failed check:

[2021-12-14 16:22:45] WARNING: failed to rate http(s) download (https://mirror.cyberbits.asia/archlinux/community/os/x86_64/community.db): <urlopen error [Errno 101] Network is unreachable>

I don't understand why is it present in the list. Well, at least it had the decency to put it at the bottom on the list.

Ok, so to conclude this, based on my testing and other elements that I've seen in Arch based linux, it's clear to me that the reflector should handle this more properly, WITHOUT specifying the country. I'll update this thread topic with the conclusion. I'm sorry for the frustration I've caused, but this was a learning experience for me and I thank all of you for your time.

3 Likes