Bug 231824 - devel/glib20: Fails to package with DEFAULT_VERSIONS=python=3.7
Summary: devel/glib20: Fails to package with DEFAULT_VERSIONS=python=3.7
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Antoine Brodin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-30 14:40 UTC by Tobias Kortkamp
Modified: 2018-10-02 07:40 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Kortkamp freebsd_committer freebsd_triage 2018-09-30 14:40:41 UTC
After ports r480951 glib20 fails to package with DEFAULT_VERSIONS=python=3.7. It was fine before.

=======================<phase: package        >============================
===>  Building package for glib-2.56.1_1,1
pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/__init__.opt-1.cpython-37.pyc:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/codegen.opt-1.cpython-37.pyc:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/codegen_docbook.opt-1.cpython-37.pyc:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/codegen_main.opt-1.cpython-37.pyc:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/config.opt-1.cpython-37.pyc:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/dbustypes.opt-1.cpython-37.pyc:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/parser.opt-1.cpython-37.pyc:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/devel/glib20/work/stage/usr/local/share/glib-2.0/codegen/__pycache__/utils.opt-1.cpython-37.pyc:No such file or directory
*** Error code 1
Comment 1 Raivo Hool 2018-09-30 20:45:31 UTC
Same behaviour with DEFAULT_VERSIONS=python=3.6.
Comment 2 Charlie Li freebsd_committer freebsd_triage 2018-10-01 02:26:49 UTC
This port's plist conflicts with Mk/Uses/python.mk in how PYTHON_PYOEXTENSION is defined. Currently, for the cases of Python 3.5 and later (which this bug applies to), PYTHON_PYOEXTENSION is just opt-1.pyc. But in this plist, the opt-1 part comes before the .cpython-%%PYTHON_SUFFIX%%.pyc, with the ending becoming opt-1.cpython-%%PYTHON_SUFFIX%%.pyc, which results in this build failure when python>=3.5.

CCing python@ for more input.
Comment 3 Charlie Li freebsd_committer freebsd_triage 2018-10-01 03:23:57 UTC
(In reply to Charlie Li from comment #2)
The offending line seems to be https://svnweb.freebsd.org/ports/head/Mk/Uses/python.mk?view=markup#l621

The .cpython-%%PYTHON_SUFFIX%% bit is placed between opt-1 and .pyc (resulting in opt1-cpython-%%PYTHON_SUFFIX%%.pyc), where instead should be before opt-1.pyc. The stage process for this port results in the correct locations and filenames, but the script that converts PYTHON_PYOEXTENSION for python >= 3.5 needs fixing. Unfortunately, my awk-fu is nearly nonexistent so it may take a while for me to prepare a patch (if it ends up being the case).
Comment 4 Charlie Li freebsd_committer freebsd_triage 2018-10-01 06:25:28 UTC
Looks like antoine@ fixed the plist. This can probably be closed now.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2018-10-02 07:40:19 UTC
See: ports r480998