Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 693910 - dev-lang/python-exec-2.4.6-r1 always install /usr/bin/python2
Summary: dev-lang/python-exec-2.4.6-r1 always install /usr/bin/python2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-09-09 13:27 UTC by Francesco Riosa
Modified: 2019-09-09 18:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Riosa 2019-09-09 13:27:58 UTC
# qlist dev-lang/python-exec | grep python2
/usr/bin/python2
/usr/bin/python2-config

emerge -pv --nodeps dev-lang/python-exec
[binary   R    ] dev-lang/python-exec-2.4.6-r1:2::gentoo  PYTHON_TARGETS="(pypy3) (python3_7) -jython2_7 -pypy -python2_7 (-python3_5) (-python3_6)" 0 KiB

Even after modification of package.use.force to remove py2 uses; python-exec always install python2 binary, even when python:2.7 is _not_ installed nor it will be installed

running it result in:
# python2
python2: no python-exec wrapped executable found in /usr/lib/python-exec.

This should be fixed per se, but it also has consequences if some script check for executables, an example is virglrenderer configure script which contains:

AC_CHECK_PROGS([PYTHON], [python2 python python3])
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-09-09 15:59:24 UTC
Well, it obviously won't affect normal Gentoo users since all flags are forced on but I guess I can fix it for you.
Comment 2 Larry the Git Cow gentoo-dev 2019-09-09 18:48:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9df59462c9f3731db65e62fd852605ad569f702

commit e9df59462c9f3731db65e62fd852605ad569f702
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-09-09 16:19:26 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-09-09 18:48:08 +0000

    dev-lang/python-exec: Install python{2,3} conditionally
    
    Closes: https://bugs.gentoo.org/693910
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/12892
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-lang/python-exec/python-exec-2.4.6-r1.ebuild | 20 ++++++++++++++++++--
 dev-lang/python-exec/python-exec-9999.ebuild     | 20 ++++++++++++++++++--
 2 files changed, 36 insertions(+), 4 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6cbb1015f80c550e41873048a7b5b660f98c4ea5

commit 6cbb1015f80c550e41873048a7b5b660f98c4ea5
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-09-09 16:11:24 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-09-09 18:48:07 +0000

    dev-lang/python-exec: Respect PYTHON_TARGETS (NFC)
    
    Actually use PYTHON_TARGETS when building implementation list.  This is
    NFC since all targets are package.use.forced but it lets advanced users
    customize behavior via un-forcing those flags.
    
    Bug: https://bugs.gentoo.org/693910
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-lang/python-exec/python-exec-2.4.6-r1.ebuild | 6 ++++--
 dev-lang/python-exec/python-exec-9999.ebuild     | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)