Archlinux package management strategies: Difference between revisions

From wikinotes
No edit summary
 
Line 9: Line 9:
= Python Upgrades =
= Python Upgrades =
<blockquote>
<blockquote>
== Failures ==
See [[pacman troubleshooting]].
<blockquote>
{{ expand
| Install python-old alongside python-new
|


The problem is that most of the dependencies will have been already moved over to the new python version.
TL;DR rebuild all python AUR packages, and reinstall.
 
<syntaxhighlight lang="bash">
# EXPLANATION:
    # list installed python3.11 packages
    packages=$(pacman -Qoq /usr/lib/python3.11)
 
    # list executables for these python packages
    executables=$(for f in $(pacman -Qoq /usr/lib/python3.11); do; pacman -Ql $f; done | grep -E '/bin/.')
 
# replace shebang with python3.11 for all python3.11 packages
for x in $(for f in $(pacman -Qoq /usr/lib/python3.11 | grep -v python311); do; pacman -Ql $f; done | grep -E '/bin/.' | awk '{ print $2 }') ; do; sudo sed -i 's^#!/usr/bin/python^#!/usr/bin/python3.11^' "$x" ; done
</syntaxhighlight>
 
}}
</blockquote><!-- Failures -->
</blockquote><!-- Python Upgrades -->
</blockquote><!-- Python Upgrades -->

Latest revision as of 17:10, 11 May 2024

The painful parts of arch are mostly related to libraries:

  • python updates take a while to reach all packages (so they get installed to the wrong site-packages)
  • libva updates may be too new for makemkv etc
  • qt updates are sometimes problematic as well

To mitigate this, I've been exposing old versions of the libraries to my package-repo

  • ex. installing python-311 when python-3.12 became default

Python Upgrades

See pacman troubleshooting.

TL;DR rebuild all python AUR packages, and reinstall.