Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 528714 - dev-util/gprof2dot-0_p20130517 should REQUIRED_USE for PYTHON_TARGETS ( fails src_install )
Summary: dev-util/gprof2dot-0_p20130517 should REQUIRED_USE for PYTHON_TARGETS ( fails...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sebastian Pipping
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-09 09:59 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2014-11-21 23:49 UTC (History)
0 users

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


Attachments
emerge --info (einfo,5.44 KB, text/plain)
2014-11-09 09:59 UTC, Kent Fredric (IRC: kent\n) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2014-11-09 09:59:39 UTC
Created attachment 388920 [details]
emerge --info

----------
emerge -vat gprof2dot 

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild  N     ] dev-util/gprof2dot-0_p20130517  PYTHON_TARGETS="-python2_7 (-python3_2) -python3_3" 0 KiB
...

>>> Install gprof2dot-0_p20130517 into /var/tmp/portage/dev-util/gprof2dot-0_p20130517/image/ category dev-util
 * No Python implementation selected for the build. Please add one
 * of the following values to your PYTHON_TARGETS (in make.conf):
 * 
 * python2_6 python2_7 python3_2 python3_3

 * ERROR: dev-util/gprof2dot-0_p20130517::gentoo failed (install phase):
 *   No supported Python implementation in PYTHON_TARGETS.
 * 
---------

I believe the simple fix here is:

REQUIRED_USE="${PYTHON_REQUIRED_USE}"



Which seems to do the job for me.
Comment 1 Sebastian Pipping gentoo-dev 2014-11-09 14:43:52 UTC
Hi!

Looking at the emerge info I believe that

  PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4"

in your environment is the troublemaker here.
The ebuild does not support 3.4.


I'm not sure why REQUIRED_USE="${PYTHON_REQUIRED_USE}" worked for you.
The ebuild does not touch REQUIRED_USE itself and the eclass python-r1 says "sets correct IUSE and REQUIRED_USE" and seems to use the python-utils-r1 eclass for that.


So I would ask you to try again with

  PYTHON_TARGETS="python3_3 python3_4"

Thanks!
Comment 2 Sebastian Pipping gentoo-dev 2014-11-09 20:51:57 UTC
Hello again!

I figured it would be good to see if gprof2dot could actually support Python 3.4 and to unlock support of it if so.

+  09 Nov 2014; Sebastian Pipping <sping@gentoo.org>
+  gprof2dot-0_p20130517.ebuild:
+  Remove Python 2.6 target, add Python 3.4 (bug #528714)
+

If I misunderstood the original report and there still is need for a fix, please re-open this report.  Thanks!
Comment 3 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2014-11-10 12:27:49 UTC
(In reply to Sebastian Pipping from comment #1)
> Hi!
> 
> Looking at the emerge info I believe that
> 
>   PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4"
> 
> in your environment is the troublemaker here.
> The ebuild does not support 3.4.
> 
> 
> I'm not sure why REQUIRED_USE="${PYTHON_REQUIRED_USE}" worked for you.

I have my env set up to give nothing other than 3.4, and ebuilds that fail that requirement  get overides added in package.env.

That is to say, REQUIRED_USE is useful in that it tells me my PYTHON_* flags are wrong *before* I attempt to emerge things, not *after* they're emerging and failing at the end of src_install.

Adding REQUIRED_USE changed the package to correctly tell me my ENV was inadequate, and thus failed at the right time, allowed me to correct it, and then proceed as expected.

=~ User configuration problems should be reported as soon as possible, not late.

And by "getting it to work" I mean "Portage reported an error with my PYTHON_ instead of pretending it was ok".

Sorry if I wasn't clearer =)
Comment 4 Sebastian Pipping gentoo-dev 2014-11-10 12:53:52 UTC
Please explain how adding

  REQUIRED_USE="${PYTHON_REQUIRED_USE}"

makes a difference.  I don't see why it would, yet.
Comment 5 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2014-11-10 15:00:11 UTC
(In reply to Sebastian Pipping from comment #4)
> Please explain how adding
> 
>   REQUIRED_USE="${PYTHON_REQUIRED_USE}"
> 
> makes a difference.  I don't see why it would, yet.

Because instead of failing in the middle/end of an emerge, it fails before the emerge starts.

And that's the very reason we *have* REQUIRED_USE, it allows that requirement to be visible as far forwards as possible, instead of having every ebuild fail during src_configure/src_test/src_install etc.

Because it _IS_ a requirement that the user set those things.

Just presently, the user doesn't get told of that requirement until late in the install phases.
Comment 6 Sebastian Pipping gentoo-dev 2014-11-21 23:49:28 UTC
Hi again,


part of why I had trouble understanding what's going on here before is that the python-r1 eclass says

  "This eclass sets correct IUSE and REQUIRED_USE"

while that is only true for IUSE.  So I have

  1. added the line you proposed to the ebuild and

  2. opened a bug against the python-r1.eclass (bug #530086).


To my understanding, this bug should be fixed to you now.  Thanks for the report!


+  21 Nov 2014; Sebastian Pipping <sping@gentoo.org>
+  gprof2dot-0_p20130517.ebuild:
+  Fix use of python-r1 eclass (bug #528714)
+