Solved Upgrading python from 3.7 to 3.8 from ports using portmaster

I build everything from ports using portmaster and i would like to upgrade from python3.7 to python3.8. Some of my systems have 40-50 packages of py37 or non-python packages that depend on them. Is there an easy way of doing this upgrade?
 
The update procedure is described in /usr/ports/UPDATING:
Code:
20210425:
  AFFECTS: users of python
  AUTHOR: kai@FreeBSD.org

  The default version of python3 and python was switched to 3.8.

  For ports users wanting to keep version 3.7 as default,
  add DEFAULT_VERSIONS+= python=3.7 python3=3.7 to make.conf

  Following procedures may ease the upgrade:

  For users of pre-build packages:
  # sh
  # for i in $(pkg query -g %n 'py37-*'); do pkg set -yn ${i}:py38-${i#py37-}; done
  # pkg upgrade

  For portmaster users:
  # sh
  # portmaster -o lang/python38 python37
  # REINSTALL="$(pkg info -o py37-\* | awk '{printf "%s ", $2}')"
  # pkg delete -f py37-\*
  # portmaster $REINSTALL
  # REBUILD=$(pkg query -g "%n:%dn" '*' | grep py3 | grep -v py38 | cut -d : -f 1 | sort -u)
  # portmaster $REBUILD
  # REBUILD2=$(pkg list | grep python-37 | xargs pkg which | awk '{print $6}' | sort -u)
  # portmaster $REBUILD2
I still had to rebuild some ports (samba412, llvm10) after that as pkg check -d was still complaining about missing python shared libs, but now it's done and all seems fine.
 
Didn't know about that portmaster flag, the option I usually go for is this in /etc/make.conf
Code:
DISABLE_VULNERABILITIES=yes
The portmaster line is neater in that you don't have to remember to comment out the change in /etc/make.conf.
 
I build everything from ports using portmaster and i would like to upgrade from python3.7 to python3.8.
Why? What's broke with what you've got running now that you find the need to upgrade?

If it's running I usually leave things as they be unless there is a vulnerability.

Or fixing one thing breaks another. Which is primarily why I don't fix it till it's broke. That others do the same advise often offered.

python38-3.8.9 is broke and I'm waiting to fix it:
Code:
root@bakemono:/ # pkg audit -F
Fetching vuln.xml.bz2: 100%  927 KiB 949.2kB/s    00:01    
python38-3.8.9 is vulnerable:
  Python -- multiple vulnerabilities
  WWW: https://vuxml.FreeBSD.org/freebsd/bffa40db-ad50-11eb-86b8-080027846a02.html

1 problem(s) in 1 installed package(s) found.
root@bakemono:/ #
 
Back
Top