If we don't have a distcc user, we need to reinstall distcc, even if it's been built...
authorChris Gianelloni <wolf31o2@gentoo.org>
Fri, 9 May 2008 04:19:26 +0000 (04:19 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Fri, 9 May 2008 04:19:26 +0000 (04:19 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1409 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
targets/support/chroot-functions.sh

index 2aee374648f4c28748e4ccca4015d5734f0afdf2..0a1d368ed7187b4b028428fd12d170f3a8240ce8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 # 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
index a11617e03c3fc6c0229b76adce70120bba1a4b2f..f91f53cd6a4acbde36677684f32e118e32db85bf 100755 (executable)
@@ -73,7 +73,16 @@ setup_myfeatures(){
                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