Upgrading mesa-git when it complains about llvm dependency conflicts

A quick article on how to solve the issue of not being able to upgrade mesa-git and lib32-mesa-git due to a llvm-libs dependency error thrown by the older version of mesa you're trying to upgrade away from.

Upgrading mesa-git when it complains about llvm dependency conflicts

If you're using mesa-git (and lib32-mesa-git), you might occasionally run into the issue where pacman/yay refuses to upgrade them as it complains upgrading accompanying and required llvm-libs package conflicts with what the currently installed mesa-git needed.

It's a bit odd. You'd think that shouldn't be a problem as you're upgrading exactly those packages anyway, but that's how it seems to be.

Screenshot showing yay failed to upgrade mesa-git and lib32-mesa-git as upgrading llvm-libs breaks the *currently installed* version of mesa-git's requirement

Fortunately you can still encourage an upgrade, and it's as simple as adding the -d (or --nodeps). This flag skips the dependency version checks. With this simple flag added you can proceed with the upgrade as normal.

As it might bring unforeseen issues when using this option in other situations, I would recommend you only use it specifically for mesa-git and lib32-mesa-git. Whenever I run into this dependency oddity —which, fortunately, does not happen every time— I simply upgrade mesa-git and lib32-mesa-git first, and then proceed with a full upgrade for whatever may be left.

❯ yay -Sd mesa-git lib32-mesa-git

After this upgrade is down, you can now proceed with your system upgrade as usual.

I hope this helps!