[Bug 257660] mail/mailutils: PYTHON option can fail if python-config (from lang/python) is installed

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 06 Aug 2021 14:54:21 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257660

            Bug ID: 257660
           Summary: mail/mailutils: PYTHON option can fail if
                    python-config (from lang/python) is installed
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs_at_FreeBSD.org
          Reporter: jcfyecrayz_at_liamekaens.com

If lang/python is installed, python-config is a symlink to python3-config (or
in the old days, python2-config).  If lang/python was installed when an older
python was the default python than the current default python, then
python-config will point to the older version.

example:
% ls -al /usr/local/bin/python-config /usr/local/bin/python3-config
lrwxr-xr-x  1 root  wheel  14 Dec 18  2019 /usr/local/bin/python-config_at_ ->
python3-config
lrwxr-xr-x  1 root  wheel  16 Aug 18  2020 /usr/local/bin/python3-config_at_ ->
python3.7-config
% make -C /usr/ports/lang/python -V PYTHON_CMD
/usr/local/bin/python3.8

The configure script for mail/mailutils has a seat belt to verify that
python-config (or $PYTHON_CONFIG) matches the version in the python header
files it is using.  When it doesn't match, configure overrides --enable-python
and disables it.

>From the configure script:

$as_echo_n "checking whether python-config ($PYTHON_CONFIG) is of same version
as python... " >&6; }
 .
 .

As a result of that, none of the python files are installed and pkg-plist does
not reflect that (it expects the python files).  'make check-plist' and 'make
package' fail.


% make stage check-plist
 .
 .
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: lib/libmu_py.a
Error: Missing: lib/libmu_py.so
Error: Missing: lib/libmu_py.so.8
Error: Missing: lib/libmu_py.so.%%LIBVERSION%%
Error: Missing: %%PYTHON_SITELIBDIR%%/mailutils/__init__.py
Error: Missing:
%%PYTHON_SITELIBDIR%%/mailutils/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
Error: Missing:
%%PYTHON_SITELIBDIR%%/mailutils/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc


If you don't have the PYTHON option enabled or python-config matches
PYTHON_CMD, then you won't hit this problem.

It's possible that when changing python defaults, we should be bumping PORTRE

--- Comment #1 from Bugzilla Automation <bugzilla_at_FreeBSD.org> ---
Maintainer informed via mail

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Fri Aug 06 2021 - 14:54:21 UTC

Original text of this message