Skip to content

Instantly share code, notes, and snippets.

@diffficult
Last active December 13, 2021 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diffficult/dd939ba5ef06c9821e097666592b5516 to your computer and use it in GitHub Desktop.
Save diffficult/dd939ba5ef06c9821e097666592b5516 to your computer and use it in GitHub Desktop.
ARCHLINUX: How to rebuild packages when a new version of Python releases and gets added to [core]

How to identify and rebuild packages when a new version of Python is released

2021-12-12

Python 3.10 is now in [core].

You may need to rebuild any Python packages you've installed from the AUR. To get a list of them, you can run:

pacman -Qoq /usr/lib/python3.9

And to rebuild them all at once with an AUR helper such as yay, you can do:

yay -S $(pacman -Qoq /usr/lib/python3.9) --answerclean All

But if any of the packages don't work with Python 3.10 yet, this might fail halfway through and you'll have to do rebuild the remaining ones one or a few at a time.

An alternative to this oneliner could be

for pkg in $(pacman -Qoq /usr/lib/python3.9); do yay -S $pkg --answerclean All; done

In which case yay will rebuild one package after the next from the list you got from quering pacman.

For paru users you can pretty much do the same using...

pacman -Qoq /usr/lib/python3.9 | pacman -Qmq - | paru -S --rebuild -


Source:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment