Garuda-update overwriting /etc/pacman.conf

This is an observation, not a complaint (overall I quite like Garuda and particularly appreciate the good job done to make snapper boot possible).

I like to use the Arch testing repositories (core-testing, extra-testing, multilib-testing, and gnome-unstable). I know this is not generally recommended, but I enjoy seeing what the very latest packages are and I’ve used Arch for quite awhile and am comfortable fixing my system if needed.

I would happily use garuda-update as I appreciate what it does, however it always overwrites the /etc/pacman.conf file and replaces “core-testing” in pacman.conf with “testing”, which it then subsquently can’t find when it runs the update process. I wonder if a switch could be added to the command line to tell garuda-update to leave the pacman.conf file alone? I can certainly appreciate if my use case is so unusual that it’s deemed that this is not useful for Garuda. I can do what I want just using yay to update if that is the case.

Thanks again for a really nice distro.

Welcome back @whelanh. :waving_hand:

It seems you have discovered a bug! The issue is in /usr/lib/garuda/garuda-update/update-helper-scripts, specifically this part here: garuda-update/update-helper-scripts · main · Garuda Linux 🦅 / PKGBUILDs · GitLab

The intention of this part of the code is to identify if the user has any of the deprecated repositories in /etc/pacman.conf (see this related announcement: Arch Linux - News: Cleaning up old repositories), and if a deprecated repo is found it gets changed to a current repo.

Unfortunately the core-testing block in this script has a little oopsie, in that the values for testing and core-testing have been accidentally reversed. In other words, the script should be checking for [testing] and changing it to [core-testing], not the other way around.

If you’d like to fix this on your own, edit /usr/lib/garuda/garuda-update/update-helper-scripts, scroll down to line 122, and change [core-testing] to [testing] and vice-versa so the if statement looks like this:

     else if ($0 == "[testing]")
    {
        print "[core-testing]"
        err=0
        next
    }

I’ll work on getting this straightened out in the repo, so the actual package gets fixed as well.

Edit:

Fixed in garuda-update-4.8.6. :partying_face:

11 Likes

Wow! Thank you so much for your really nice explanation. I will make the change in my local version for now and look for the change in the repo. Kind regards

2 Likes

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