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
Created attachment 57541 [details, diff] patch to fix distcc-config CHOST detection distcc-config | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
portage is also fetching the info from make.conf.
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`.
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!
Fixed in version distcc-config-1.3. Going to be released soon.