Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104085 - distcc-config syntax error crashes app; fix submitted
Summary: distcc-config syntax error crashes app; fix submitted
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Markus Nigbur (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-28 18:15 UTC by Jamie Saker
Modified: 2006-04-09 23:43 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 Jamie Saker 2005-08-28 18:15:55 UTC
Latest distcc-config comes with syntax error bug in /usr/bin/distcc-config.
Error causes:

system ~ # distcc-config --help
  File "/usr/bin/distcc-config", line 155
    chost portage['CHOST'] = open('/etc/make.conf', 'r').read()


Reproducible: Always
Steps to Reproduce:
1. emerge distcc-config (will succeed)
2. run 'distcc-config --help' or any other distcc-config parameter
3. Python SyntaxError will result




The following is a solution (not work-around) to resolve the problem. Hopefully
distcc-config's author can fix upstream for future emerges.

Line 153 is incorrect in distcc-config. I have commented out and fixed as follows:

                if portage.settings.has_key('CHOST'):
                        # Broken code was:
                        #chost portage.settings['CHOST']makeconf =
open('/etc/make.conf', 'r').read()
                        # fixed code should be:
                        portage.settings['CHOST'] = open('/etc/make.conf',
'r').read()
Comment 1 Steev Klimaszewski (RETIRED) gentoo-dev 2005-08-28 18:31:26 UTC
steev@mentor ~ $ distcc-config --help
Usage: /usr/bin/distcc-config --set-hosts DISTCC_HOSTS | --get-hosts
       /usr/bin/distcc-config --set-verbose { 0 | 1 }  | --get-verbose
       /usr/bin/distcc-config --set-log FILE           | --get-log
       /usr/bin/distcc-config --set-env VARIABLE VALUE | --get-env [VARIABLE]


What version of distcc, and what version of python?
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-08-29 00:55:24 UTC
Post emerge --info output as instructed to when filing the bug, post you distcc
version (and if you are using sys-devel/distcc-config, tell that as well) and
reopen then.
Comment 3 Jamie Saker 2005-08-29 09:25:07 UTC
Additional info as requested (note: this bug affected ALL 23 systems I updated
this weekend - from Intel P4 to an old Celeron processor Gentoo lab laptop
that's my clean testbed). I'm including emerge info from that system, but the
problem appears to be universal to ~x86, x86, gentoo, gentoo-hardened, etc. that
I work with.

distcc-config version:
# $Header: /var/cvsroot/distcc-config/distcc-config,v 1.3 2005/06/26 19:10:54
pyrania Exp $

python version:
moof bin # python -V
Python 2.4.1

emerge info:
Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r1,
2.6.11-hardened-r15 i686)
=================================================================
System uname: 2.6.11-hardened-r15 i686 Celeron (Coppermine)
Gentoo Base System version 1.12.0_pre6
distcc 2.18.3 i386-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.3.5-r1, 2.4.1-r1
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i386-pc-linux-gnu"
CFLAGS="-march=pentium3 -Os -fomit-frame-pointer"
CHOST="i386-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -Os -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distcc distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://mirror.mcs.anl.gov/pub/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X acpi alsa apm arts avi berkdb bitmap-fonts crypt cups eds emboss
encode fam foomaticdb fortran gd gdbm gif gpm gstreamer gtk2 hardened imlib ipv6
java jpeg kde libg++ libwww mad mikmod mmx motif mozilla mp3 mpeg ncurses nls
ogg oggvorbis opengl oss pam pdflib perl png postgres python qt quicktime
readline sdl spell ssl tcpd tiff truetype truetype-fonts type1-fonts unicode
vorbis xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

*  sys-devel/distcc-config
      Latest version available: 1.3
      Latest version installed: 1.3
      Size of downloaded files: 2 kB
      Homepage:    http://dev.gentoo.org/~pyrania/distcc-config
      Description: Utility to change distcc's behavior
      License:     GPL-2
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2005-08-29 09:37:35 UTC
You forgot to reopen.
Comment 5 Jamie Saker 2005-08-31 13:33:18 UTC
(In reply to comment #4)
> You forgot to reopen.

Reopen what? Sorry if I'm missing something Jakub - I think I may have missed
something in translation. Can you explain further? Also, I'd suggest someone
simply looks at the Python code per the bug. It is a rather basic Python coding
error that I reported and resolved and won't work the way the source is coded.

Jamie
Comment 6 Jamie Saker 2005-09-03 06:52:24 UTC
(In reply to comment #5)

Are you suggesting I re-submit the bug ("reopen")? Please advise.

Jamie

Comment 7 Jamie Saker 2005-09-23 21:34:39 UTC
I'm updating status - this bug fix needs to be applied as the fix is submitted
below. This isn't that hard and the work has been done for you.

I encountered the bug with two new Gentoo installs today in the lab and was
surprised that nobody has taken care of it yet. Gentoo's getting an increasingly
bad rep because of bug handling and obscure comments like Jakub's (who
apparently can't ever answer a question either). Let's get it together people
and take care of our distro.

Jakub - pls email me offline about your handling of tix and a few suggestions I
have for you.

Jamie
Comment 8 Brian Jackson (RETIRED) gentoo-dev 2005-09-24 11:59:24 UTC
Use the distcc-config that comes with distcc. It works great.
Comment 9 Markus Nigbur (RETIRED) gentoo-dev 2006-04-09 23:43:23 UTC
fixed.