Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 29313

Summary: Portage's invocation of '`which gcc` -dumpversion' does not call gcc directly
Product: Portage Development Reporter: Lisa Seelye (RETIRED) <lisa>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch for emerge
Fixed patch for emerge

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