Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 554180 - net-analyzer/rrdtool-1.5.3-r1 - set REQUIRED_USE to pull in dev-lang/python:2.7
Summary: net-analyzer/rrdtool-1.5.3-r1 - set REQUIRED_USE to pull in dev-lang/python:2.7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-07 21:31 UTC by Johan Bergström
Modified: 2015-07-08 05:16 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 Johan Bergström 2015-07-07 21:31:04 UTC
Since building against python is optional, we need to make a few minor edits to the ebuild. Thanks to @mgorny for suggesting REQUIRED_USE.

Inlining diff here since it's so small -- sorry for potentially bad behaviour :/

diff --git net-analyzer/rrdtool/rrdtool-1.5.3-r1.ebuild net-analyzer/rrdtool/rrdtool-1.5.3-r1.ebuild
index efe2e72..e9f0310 100644
--- net-analyzer/rrdtool/rrdtool-1.5.3-r1.ebuild
+++ net-analyzer/rrdtool/rrdtool-1.5.3-r1.ebuild
@@ -18,6 +18,7 @@ LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~x86 ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos ~x86-solaris"
 IUSE="dbi doc graph lua perl python rados rrdcgi ruby static-libs tcl tcpd"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"

 CDEPEND="
        >=dev-libs/glib-2.28.7:2[static-libs(+)?]
@@ -61,6 +62,10 @@ python_install() {
        distutils-r1_python_install
 }

+pkg_setup() {
+       use python && python-single-r1_pkg_setup;
+}
+
 src_prepare() {
        # At the next version bump, please see if you actually still need these
        # before adding versions
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2015-07-08 04:07:14 UTC
What does the patch do? The Summary doesn't say anything about the patch.
Comment 2 Johan Bergström 2015-07-08 04:11:13 UTC
Old summary was perhaps a bit short but I tried to sum it up. Where we previously required an installed python 2.7 which was pulled by REQUIRED_USE= through PYTHON_TARGETS="python2_7" it is now depending on the IUSE=python flag.

These were set by inheriting distutils-r1 (and are now overridden).

Apologies, should have explained better.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2015-07-08 04:27:13 UTC
Now I still don't know what pkg_setup does. I guess python*.eclass is reaching the Magic Point just like python.eclass once did.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2015-07-08 05:16:03 UTC
Just to disambiguate that remark about the Magic Point: this refers to "Any sufficiently advanced eclass is indistinguishable from magic". It wasn't intended as criticism, just as a neutral comment about the state of the eclasses. :)