My AUR built packages keep getting merged into the chaotic-aur. I have chaotic-aur for garuda default packages like firedragon, garuda assistant etc.
I install programs from AUR using paru specifically telling it to download from AUR (paru -Sa). The packages get built and installed, but then for no reason the packages become part of chaotic-aur. Any way to stop this behaviour?
pacman doesn't store the source of the package so it looks in the repos for a package of the same name and if it finds it, it updates it from the repos. Since chaotic-aur is a repo on your system it will always prioritize updates from there.
Working around that is likely to be somewhat clumsy. For example, you could have two different pacman.conf's with and without chaotic-aur enabled. Then you could choose which one to use based on your update strategy.
Alternatively many helpers support using AUR/packagename so you could build a script/alias/function that explicitly upgraded those from AUR when you update.
If you told us what exactly broke, we might be able to fix it. Imagine other people also suffered from issues, how is it going to be fixed? - right, it needs to be reported!
Sorry. It was on my previous Garuda install on the same machine 3-4 weeks ago. This was the time I first installed Linux on bare metal, didn't know much back then and thought it was part of "Arch instability" some people talk about.
From what I remember, installing some package through pamac GUI from chaotic-aur, it updated some garuda config files (even though I had done full system upgrade before hand) as part of installing it. After this pretty much nothing from Garuda Assistant app was working and kept throwing garuda config file errors.
That's why I decided to install packages from AUR even if they are available from chaotic-aur on my next install. Right now it's running nicely on my machine and I have setup timeshift in case something goes downhill again.
PS: Don't use pamac anymore too, I use pacman, and paru for AUR packages now.
Please from now on report issues either at the packages repo of Chaotic-AUR or here. We are dedicated to precompiling stuff for users to save time, potentially fixing eventual bugs in PKGBUILDs as well.
I suspect if you put the Chaotic AUR repo at the bottom of pacman.conf--or eliminate it altogether--you'd tend to be a bit more successful. But then you wouldn't exactly be running Garuda anymore, either, would you?
Since you want pkgbuilds straight from the AUR, why not run straight Arch with the Chaotic AUR as an additional source? There are a number of vanilla Archlinux installers using Calamares, with or without even more installation options, by the way. Or just do a handy.
There is probably no good middle road on this thing. You're either running Garuda, Arch, or some bastardized system doomed for failure. Mixing 'n' matching virus vaccines may work in humans, but every time I've chosen that third route in (Arch) Linux, I have not ended up a happy camper.
Another approach could be to create a local repo that only contained the garuda* packages from chaotic.
That being said, I am not sure the reason you are avoiding chaotic is entirely warranted. Are you sure what happened to your system was specifically related to chaotic?
That would create the exact same problem. It doesn't matter which Arch-based distro you run in this case. As soon as you add chaotic-aur to your pacman.conf, it becomes part of your repos and will override your ability for helpers to get updates from the AUR.
Therein lies the problem. Helpers aren't so helpful when they cannot discriminate pkgbuild repositories. Using either Pacman or (say) yay commands from a terminal can. According to the Chaoitic AUR repo page...
If you're using other third parties repositories, I recommend you to put chaotic-aur before them on /etc/pacman.conf. We update most packages hourly and follow AUR's PKGBUILDs, which makes this repository more suitable as the first option when downloading packages.
The above statement, by inference, implies you should put the Chaotic repo at the bottom of pacman.conf to switch sources.
You can pick the repository from which you download a package, like this: pacman -S chaotic-aur/dxvk-mingw-git. Some AUR's helpers support it too, e.g: yay -S aur/firefox-hg
And those two lines supports the option.
But, once again, this sets a user up for a bastardized system and I assume that is not the objective of the exercise.
The order in pacman.conf only impacts packages brought in from the repos. Whether it is at the bottom or the top it is still a repo and will always take precedence over the AUR.
The issue the OP has is that even if they carefully install a package from the AUR, as soon as an update comes through, it will get replaced with the chaotic version.
This happens even if you don't use helpers at all. Even if you only use pacman and makepkg. Since pacman doesn't store the source of a package, even if you manually build and install a package from AUR, it will still get updated from chaotic-aur by pacman if you have enabled it in pacman.conf.