I have the Archlinuxcn set up, it is handy for some larger packages (browsers etc) and emacs-git, or I thought it was.
Their emacs-git does not have the native compilation flag set, so I would rather compile it.
How can I ignore a package and prefer the aur version?
Ahhh, found the problem - today the Archlinuxcn package rel number is higher than the aur package:
emacs-git 220.127.116.11798-1 -> 18.104.22.168798-2
This has never happened before, causes my script to fail
Won’t adding it to
IgnorePkg line in
Most AUR helpers honor that line as well so that may cause it to be ignored completely.
IgnorePkg = sqlitestudio sqlitestudio-plugins tree-sitter-bash-git
IgnorePkg = archlinuxcn/emacs-git
#IgnorePkg = emacs-git
- Uncomment bottom line - nothing installs.
- It ignores repo/pkg
It isn’t easy to do this actually. It is one of the challenges with using big 3rd party repos.
You could maybe try creating an alias to update with and adding aur/emacs-git --needed to the update. You would need to test though.
That was what I was doing, but today the repo package is a higher number:
if [[ "$DAY" == "7" ]]; then
sudo sed -i 's/^IgnorePkg = emacs-git/#IgnorePkg = emacs-git/' /etc/pacman.conf
echo "emacs-git" > $HOME/.up.txt
yay -S aur/emacs-git --noconfirm
echo "Not Equal"
sudo sed -i 's/^#IgnorePkg = emacs-git/IgnorePkg = emacs-git/' /etc/pacman.conf
IMHO, using a script for this specific problem is overdoing.
If the problem is temporary, use the Normal Method to upgrade packages:
- Update the system with
- Update AUR packages using an AUR helper.
If the problem is kind-of permanent, create a separate
pacman.conf file, and insert appropriate directives for each of the upgrade types (repos, AUR). Then upgrade using the Normal Method and supplying different config. Example:
sudo pacman -Syu
trizen -Sua --config /etc/pacmanAUR.conf