Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 12306 - Poor error message when COUNTER is not generated
Summary: Poor error message when COUNTER is not generated
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: Alpha Linux
: High normal
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-17 09:36 UTC by chouser (RETIRED)
Modified: 2011-10-30 22:17 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 chouser (RETIRED) gentoo-dev 2002-12-17 09:36:49 UTC
ebuild incorrectly reports "ebuild: this ebuild generated output during the
depend phase (bad)" anytine an IOError exception leaks out of portage.doebuild.
 There are probably several places where IOErrors are generated and not caught
in doebuild, so to assume it is from output being generated is incorrect.  For
example, if no COUNTER file exists, portage.py line 3665 raises an IOError.

There should probably be a custom exception thrown when output is detected
during depend, and IOErrors should be allowed to propogate up so that the user
at least gets a useful (if cryptic) error message.
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2002-12-18 01:51:26 UTC
Not enough information on the COUNTER exception and lines
do not match. Code has changed in recent portages.

Custom exceptions are in another bug and tracebacks are
_FAR_ more useful than potentially cryptic messages.
Comment 2 chouser (RETIRED) gentoo-dev 2002-12-18 09:24:40 UTC
The COUNTER problem is just an example.  The line number given was for
portage-2.0.45-r5, which is fairly "recent".  If your version of portage has
different line numbers, you should be able to find the line I'm referring to
using this command:

  grep -n inforoot.*COUNTER /usr/lib/python2.2/site-packages/portage.py

...but again, this is only and example of the problem.

The actual problem (perhaps I didn't explain clearly enough) is that
/usr/sbin/ebuild catches an IOError exception and incorrectly "translates" it
into a "this ebuild generated output during the depend phase (bad)" error.  You
can find this line in /usr/sbin/ebuild using this command:

  grep -n "generated output" /usr/sbin/ebuild

In my copy of portage, I have commented out the IOError exception handler in
/usr/sbin/ebuild in order to be able to see the real errors that are generated
by the doportage function.  This may or may not be the solution that we want to
release for portage.
Comment 3 Nicholas Jones (RETIRED) gentoo-dev 2002-12-24 02:44:30 UTC
Is this still a problem in some way?
There have been updates to the counter code in .47_pre1

Can you explain exactly why you have no counter?
Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2003-01-13 11:44:57 UTC
probably fixed.