Bug 255663

Summary: UPDATING: Fix update error of python37->python38 with portmaster
Product: Ports & Packages Reporter: Norikatsu Shigemura <nork>
Component: Individual Port(s)Assignee: Kai Knoblich <kai>
Status: Closed FIXED    
Severity: Affects Some People CC: kai, python
Priority: --- Keywords: easy
Version: LatestFlags: kai: maintainer-feedback+
Hardware: Any   
OS: Any   
URL: https://wiki.freebsd.org/Python#Steps_to_switch_the_Python_default_version
Attachments:
Description Flags
A patch for updating operation text. none

Description Norikatsu Shigemura 2021-05-06 17:09:23 UTC
Created attachment 224731 [details]
A patch for updating operation text.

In "For portmaster users" on "20210425",

  # REINSTALL="$(pkg info -o py37-\* | awk '{printf "%s ", $2}')"
  # pkg delete -f py37-\*

'portmaster $REBUILD' causes a updating error like devel/scons.

===>>> scons-py37-3.1.2_1 4/4 >> devel/py-setuptools@py37 (2/2)
===>  Installing for py37-setuptools-44.0.0_1
===>  Checking if py37-setuptools is already installed
===>   Registering installation for py37-setuptools-44.0.0_1 as automatic
Installing py37-setuptools-44.0.0_1...
  Only /usr/local/bin/easy_install-3.7 script has been installed
  since Python 3.7 is not the default Python version.
===>>> Installation of devel/py-setuptools@py37 (py37-setuptools-44.0.0_1) succeeded
===>>> Returning to dependency check for devel/scons@py37
===>>> Dependency check complete for devel/scons@py37
===>>> scons-py37-3.1.2_1 4/4
===>  Cleaning for scons-py37-3.1.2_1
===>  scons-py37-3.1.2_1 Unknown flavor 'py37', possible flavors: py38 py27.
*** Error code 1
Stop.
make: stopped in /usr/ports/devel/scons
===>>> make build failed for devel/scons@py37
===>>> Aborting update
===>>> Update for scons-py37-3.1.2_1 failed
===>>> Aborting update
===>>> There are messages from installed ports to display,
       but first take a moment to review the error messages
       above.  Then press Enter when ready to proceed.

To fix this issue, specify '\*py37\*' instead of 'py37-\*'.

And I confirmed some packages that causes this issue:

bpython-py38-0.21
eric6-qt5-py38-21.4
gitinspector-py38-0.4.4_4
nuitka-py38-0.6.10.5
pylint-py38-2.8.2
scons-py38-3.1.2_1
thonny-py38-3.3.6
nagios-check_smartmon-py38-20100318_4
denyhosts-py38-3.1.2
dvdvideo-py38-20130117_2
ap24-py38-mod_wsgi-4.7.0
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-05-07 00:57:23 UTC
Thank you for the report and patch
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-05-07 13:28:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3185130dadb66a63e1341c46570084a67b8cd6f3

commit 3185130dadb66a63e1341c46570084a67b8cd6f3
Author:     Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2021-05-07 12:59:37 +0000
Commit:     Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2021-05-07 13:26:34 +0000

    UPDATING: Adjust Python 3.7 -> 3.8 instructions for portmaster

    Some ports, which use PYTHON_PKGNAMESUFFIX for their package name (e.g.
    devel/scons), must also be taken into account when portmaster is used.

    PR:             255663
    Reported by:    nork@ninth-nine.com, Rozhuk Ivan

 UPDATING | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 3 Kai Knoblich freebsd_committer freebsd_triage 2021-05-07 13:54:27 UTC
(In reply to nork from comment #0)

Thank you for the report and the given details!  I had already been able to reproduce these issues in the past few days, but had not yet had the time to update the UPDATING instructions.

I'll leave this bug report open for a few days as a reference.
Comment 4 Kai Knoblich freebsd_committer freebsd_triage 2021-08-30 09:19:34 UTC
The overall experience gained with the Python 3.7 to 3.8 upgrade were added in the FreeBSD wiki (see URL field).  It's planned to improve the UPDATING instructions in order to make the next Python upgrade better.