# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
# $Id: $
+ 09 May 2008; Chris Gianelloni <wolf31o2@gentoo.org>
+ targets/support/chroot-functions.sh:
+ If we don't have a distcc user, we need to reinstall distcc, even if it's
+ been built with the right USE. This mainly affects stage1/stage2.
+
09 May 2008; Chris Gianelloni <wolf31o2@gentoo.org>
targets/support/chroot-functions.sh:
We need to run distcc-config --install, since we won't be installing into
export DISTCC_HOSTS="${clst_distcc_hosts}"
[ -e /etc/make.conf ] && \
echo 'USE="${USE} -avahi -gtk -gnome"' >> /etc/make.conf
- clst_root_path=/ run_merge --oneshot --nodeps --noreplace sys-devel/distcc || exit 1
+ # We install distcc to / on stage1, then use --noreplace, so we need to
+ # have some way to check if we need to reinstall distcc without being
+ # able to rely on USE, so we check for the distcc user and force a
+ # reinstall if it isn't found.
+ if [ "$(getent passwd distcc | cut -d: -f1)" != "distcc" ]
+ then
+ clst_root_path=/ run_merge --oneshot --nodeps sys-devel/distcc || exit 1
+ else
+ clst_root_path=/ run_merge --oneshot --nodeps --noreplace sys-devel/distcc || exit 1
+ fi
sed -i '/USE="${USE} -avahi -gtk -gnome"/d' /etc/make.conf
mkdir -p /etc/distcc
echo "${clst_distcc_hosts}" > /etc/distcc/hosts