Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 90817 - distcc-config fails because it can't find CHOST in /etc/make.conf
Summary: distcc-config fails because it can't find CHOST in /etc/make.conf
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: Markus Nigbur (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-28 21:21 UTC by Joshua Hoblitt
Modified: 2005-06-26 10:12 UTC (History)
1 user (show)

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


Attachments
patch to fix distcc-config CHOST detection (distcc-config-chost_fix.patch,385 bytes, patch)
2005-04-28 21:24 UTC, Joshua Hoblitt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Hoblitt 2005-04-28 21:21:18 UTC
distcc-config [falsely] makes the assumption that CHOST will always be defined in /etc/make.conf.  If there is some sort of offical Python API for getting at this data (which I don't know of) it would make sense to use it here.  The fix is to instead look at the output of 'emerge info'.

# distcc-config --install
Creating /etc/env.d/02distcc...
Traceback (most recent call last):
  File "/usr/bin/distcc-config", line 140, in ?
    chost = re.compile('CHOST="(.*)"').search(makeconf).group(1)
AttributeError: 'NoneType' object has no attribute 'group'


Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3,
glibc-2.3.4.20041102-r1, 2.6.8-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.8-gentoo-r6 x86_64 AMD Opteron(tm) Processor 248
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Apr 27 2005, 17:11:19)]
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.3.4-r1
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r3, 1.6.3, 1.7.9-r1, 1.4_p6, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig distcc distlocks sandbox strict"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/
ftp://ibiblio.org/pub/Linux/distributions/gentoo/"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X acpi alsa arts berkdb bitmap-fonts crypt cups curl esd fam
font-server fortran gd gdbm gif gnome gnome2 gpm gstreamer gtk gtk2 imap imlib
ipv6 jp2 jpeg ldap libwww lzw lzw-tiff mbox motif mozilla mp3 mysql ncurses nls
nptl ogg opengl oss pam perl pic png python readline ssl tcltk tcpd tetex tiff
truetype truetype-fonts type1-fonts usb userlocales vorbis xml2 xpm xrandr xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Joshua Hoblitt 2005-04-28 21:24:35 UTC
Created attachment 57541 [details, diff]
patch to fix distcc-config CHOST detection

 distcc-config |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
Comment 2 Markus Nigbur (RETIRED) gentoo-dev 2005-06-12 21:17:35 UTC
portage is also fetching the info from make.conf. 
Comment 3 Joshua Hoblitt 2005-06-12 22:58:35 UTC
While that is factually correct, it's not the only place that Portage gets CHOST
information from.  Portage fetches the info from /etc/make.conf __AND__
/etc/make.globals.  With make.conf overriding the default value specified in
make.globals.  CHOST __IS__ defined in make.globals and does __NOT__ need to be
defined in make.conf.  I even discurage my desktop users from explicitly setting
CHOST in make.conf as it's redudant and a typo would be disasterous.  If you
don't believe me, try commenting out CHOST in your make.conf and run `emerge
info | grep CHOST`.
Comment 4 Markus Nigbur (RETIRED) gentoo-dev 2005-06-17 04:30:58 UTC
uhm. that agrument is valid, just forgot about it.
Well, I won't popen emerge info, because i would really slow down distcc-config.
Instead I'm going to include relevant portage modules and use the portage api to
detect the corret value.

Marked for next version. Thanks for the heads up!
Comment 5 Markus Nigbur (RETIRED) gentoo-dev 2005-06-26 10:12:42 UTC
Fixed in version distcc-config-1.3. Going to be released soon.