Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 69772 - Per-ebuild logging (PORT_LOGDIR) is broken on BSD.
Summary: Per-ebuild logging (PORT_LOGDIR) is broken on BSD.
Status: RESOLVED CANTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-01 14:21 UTC by Stephen Bennett (RETIRED)
Modified: 2004-11-04 05:33 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 Stephen Bennett (RETIRED) gentoo-dev 2004-11-01 14:21:02 UTC
The per-ebuild logging (PORT_LOGDIR) doesn't seem to like FreeBSD's tee. spawnebuild is spawning a tee process which just sits there looking dumb, and then returns such that ebuild calls sys.exit() and then hangs until the tee process exits. Which it doesn't. Killing the tee process causes ebuild to quit normally.

This seems to be a GNU tee/BSD tee issue, so the obvious first thing to check is option incompatibilities between the two...

Bug occurs on 2.0.51-r2, but not on .51_pre20. According to AngusYoung, .51_rc1 had the problem too, so I'm not sure why it took this long to surface. :/
Comment 1 Otavio Piske (RETIRED) gentoo-dev 2004-11-01 18:16:43 UTC
Some info about this problem (hope it helps):
The tee process state when portage hang is piperd (trying to read from a pipe).  FreeBSD's tee accept both -i and -a used in gnu. Reading portage_exec.py I didn't find any other option to this command, so I think that may be something else.
Comment 2 Otavio Piske (RETIRED) gentoo-dev 2004-11-01 23:15:54 UTC
It seems that the problem is around these statements:
retval=os.waitpid(mypid[-1],os.WNOHANG)[1]
... (some code)
if retval != 0:
... (more code)

Setting retval to 0 before the if, made it start logging.

Comment 3 Jason Stubbs (RETIRED) gentoo-dev 2004-11-02 05:53:52 UTC
Can you add a "print retval" to find out what the value actually is?
Comment 4 Otavio Piske (RETIRED) gentoo-dev 2004-11-02 09:13:40 UTC
Adding a 'print retval' always shows me negative values, like this:
-1068744901.
Comment 5 Jason Stubbs (RETIRED) gentoo-dev 2004-11-04 05:33:38 UTC
Your number there looks to be a 32bit signed int. The return value should be:
"a 16-bit number, whose low byte is the signal number that killed the process, and whose high byte is the exit status (if the signal number is zero); the high bit of the low byte is set if a core file was produced."

Something on your system and/or the FreeBSD port is broken. Feel free to reopen and reassign.