Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 856763 - net-fs/cifs-utils: build fails with USE="-python" and PYTHON_SINGLE_TARGET=""
Summary: net-fs/cifs-utils: build fails with USE="-python" and PYTHON_SINGLE_TARGET=""
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's SAMBA Team
URL: https://github.com/gentoo/gentoo/pull...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-06 23:28 UTC by Matt Whitlock
Modified: 2022-07-07 05:20 UTC (History)
0 users

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 Matt Whitlock 2022-07-06 23:28:39 UTC
net-fs/cifs-utils has REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )", implying that a PYTHON_SINGLE_TARGET need be specified only if USE="python" is enabled. However, the ebuilds unconditionally call python-single-r1_pkg_setup() and python_fix_shebang(), which die if no PYTHON_SINGLE_TARGET is specified, emitting the following error:

 * No Python implementation selected for the build. Please set
 * the PYTHON_SINGLE_TARGET variable in your make.conf to one
 * of the following values:
 * 
 * python3_8 python3_9 python3_10
 * ERROR: net-fs/cifs-utils-6.13-r1::gentoo failed (setup phase):
 *   No supported Python implementation in PYTHON_SINGLE_TARGET.
 * 
 * Call stack:
 *                   ebuild.sh, line 127:  Called pkg_setup
 *   cifs-utils-6.13-r1.ebuild, line  64:  Called python-single-r1_pkg_setup
 *     python-single-r1.eclass, line 463:  Called python_setup
 *     python-single-r1.eclass, line 453:  Called die
 * The specific snippet of code:
 *              die "No supported Python implementation in PYTHON_SINGLE_TARGET."

Please apply the following changes to the net-fs/cifs-utils-6.13-r1 and net-fs/cifs-utils-6.15 ebuilds:

-	python-single-r1_pkg_setup
+	use python && python-single-r1_pkg_setup
...
-	python_fix_shebang "${ED}"
+	use python && python_fix_shebang "${ED}"


For what it's worth, I am aware that no Python scripts are installed when
USE="-python", even if a PYTHON_SINGLE_TARGET is specified. However, I prefer to unset PYTHON_SINGLE_TARGET for packages where I have disabled Python, to avoid needlessly rebuilding them whenever the default Python target is changed.
Comment 1 Larry the Git Cow gentoo-dev 2022-07-07 05:08:37 UTC
The bug has been closed via the following commit(s):

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

commit bf90ad3e2a8b96376951d24fb7855838d6cc59a9
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-07 05:08:25 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-07 05:08:30 +0000

    net-fs/cifs-utils: fix build w/ USE=-python
    
    Closes: https://bugs.gentoo.org/856763
    Signed-off-by: Sam James <sam@gentoo.org>

 net-fs/cifs-utils/cifs-utils-6.13-r1.ebuild | 2 +-
 net-fs/cifs-utils/cifs-utils-6.15.ebuild    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2022-07-07 05:20:15 UTC
The bug has been referenced in the following commit(s):

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

commit 2ae6c02503ce15d5dcf4a595b5a6d65c420b77f9
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-07 05:20:04 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-07 05:20:04 +0000

    net-fs/cifs-utils: fix build (more) w/ USE=-python
    
    Bug: https://bugs.gentoo.org/856763
    Signed-off-by: Sam James <sam@gentoo.org>

 net-fs/cifs-utils/cifs-utils-6.13-r1.ebuild | 2 +-
 net-fs/cifs-utils/cifs-utils-6.15.ebuild    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)