Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29313 - Portage's invocation of '`which gcc` -dumpversion' does not call gcc directly
Summary: Portage's invocation of '`which gcc` -dumpversion' does not call gcc directly
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-21 23:49 UTC by Lisa Seelye (RETIRED)
Modified: 2011-10-30 22:20 UTC (History)
0 users

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


Attachments
Patch for emerge (emerge.patch,2.38 KB, patch)
2003-09-22 09:33 UTC, Jason A. Mobarak (RETIRED)
Details | Diff
Fixed patch for emerge (emerge.patch,2.35 KB, patch)
2003-09-22 10:29 UTC, Jason A. Mobarak (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lisa Seelye (RETIRED) gentoo-dev 2003-09-21 23:49:19 UTC
What it does is rely on which to return the first instance of gcc in $PATH.  If 
this is a symlink, then we're not calling gcc.

This has a direct effect on distcc and a plan to integrate distcc and portage 
with userpriv. (See bug 29171)  In a nutshell, bug 29171 creates directories for 
portage and when Portage calls '`which gcc` - dumpversion' (in 'emerge') as 
root, it calls gcc _through_ distcc.  Distcc, when invoked, creates a lock file 
owned by the user who starts distcc.  So Portage is creating a root-owned lock 
file that distcc can't delete it - and the lock file remains when Portage drops 
root privs, and distcc gets errors out the wazoo when it tries to overwrite the 
root-owned lock file.
Comment 1 Jason A. Mobarak (RETIRED) gentoo-dev 2003-09-22 09:33:15 UTC
Created attachment 18130 [details, diff]
Patch for emerge

New patch for figuring out gcc version, has several fallbacks for determining
version, and will eventual fall back on the old way of determining gcc version
but warn the user that it might break distcc.
Comment 2 Jason A. Mobarak (RETIRED) gentoo-dev 2003-09-22 09:34:37 UTC
Oh yeah, this was diffed against this emerge version:

# : /home/cvsroot/gentoo-src/portage/bin/emerge,v 1.224 2003/08/21 01:01:26 carpaski Exp $
Comment 3 Jason A. Mobarak (RETIRED) gentoo-dev 2003-09-22 10:29:36 UTC
Created attachment 18132 [details, diff]
Fixed patch for emerge

Now diffed against

# $Header: /home/cvsroot/gentoo-src/portage/bin/emerge,v 1.226 2003/09/11
03:36:21 carpaski Exp $
Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2003-09-23 10:29:52 UTC
Included in 49-r6