Yo. Looking to integrate confcache support into trunk some time in the near future- had users testing it for about 2 months (give or take), so far it's behaved pretty decently. A few packages eat themselves when ran with --cache (bad autotooling), hence the addition of restrict="confcache" being added to the patch.
Either way, patch is attached, looking for any complaints regarding it (or integrating confcache)- will be sending an email off to gentoo-dev in the next few days to get feedback from the general dev populace,, but sending this email to get feedback on the implementation in the meantime. ~harring
Index: pym/portage.py
===================================================================
--- pym/portage.py (revision 2490)
+++ pym/portage.py (working copy)
@@ -2660,7 +2660,30 @@
print "!!! Perhaps: rm -Rf",mysettings["BUILD_PREFIX"]
print "!!!",str(e)
return 1
-
+ try:
+ if "confcache" in features:
+ if not mysettings.has_key("CONFCACHE_DIR"):
+ mysettings["CONFCACHE_DIR"] =
os.path.join(mysettings["PORTAGE_TMPDIR"], "confcache")
+ if not
os.path.exists(mysettings["CONFCACHE_DIR"]):
+
os.makedirs(mysettings["CONFCACHE_DIR"], mode=0775)
+ os.chown(mysettings["CONFCACHE_DIR"],
portage_uid, -1)
+ else:
+ st =
os.stat(mysettings["CONFCACHE_DIR"])
+ if not (st.st_mode & 07777) == 0775:
+
os.chmod(mysettings["CONFCACHE_DIR"], 0775)
+ if not st.st_uid == portage_uid:
+
os.chown(mysettings["CONFCACHE_DIR"], portage_uid, -1)
+ for x in listdir(mysettings["CONFCACHE_DIR"]):
+ p =
os.path.join(mysettings["CONFCACHE_DIR"], x)
+ st = os.stat(p)
+ if not (st.st_mode & 07777) & 07600 ==
0600:
+ os.chmod(p, (st.st_mode & 0777)
| 0600)
+ if not st.st_uid == portage_uid:
+ os.chown(p, portage_uid, -1)
+
+ except OSError, e:
+ print "!!! Failed resetting perms on confcachedir %s" %
mysettings["CONFCACHE_DIR"]
+ return 1
#try:
# mystat=os.stat(mysettings["CCACHE_DIR"])
# if (mystat[stat.ST_GID]!=portage_gid) or
((mystat[stat.ST_MODE]&02070)!=02070):
Index: bin/ebuild.sh
===================================================================
--- bin/ebuild.sh (revision 2490)
+++ bin/ebuild.sh (working copy)
@@ -459,7 +459,22 @@
LOCAL_EXTRA_ECONF="--libdir=${CONF_LIBDIR_RESULT}
${LOCAL_EXTRA_ECONF}"
fi
- echo "${ECONF_SOURCE}/configure" \
+ local TMP_CONFCACHE_DIR CONFCACHE_ARG
+ if hasq confcache $FEATURES && ! hasq confcache $RESTRICT; then
+ CONFCACHE="$(type -p confcache)"
+ if [ -z "${CONFCACHE}" ]; then
+ ewarn "disabling confcache, binary cannot be
found"
+ else
+ CONFCACHE="${CONFCACHE/ /\ }"
+
TMP_CONFCACHE_DIR="${CONFCACHE:+${CONFCACHE_DIR:-${PORTAGE_TMPDIR}/confcache}}"
+ TMP_CONFCACHE_DIR="${TMP_CONFCACHE_DIR/ /\ }"
+ CONFCACHE_ARG="--confcache-dir"
+ fi
+ else
+ CONFCACHE=
+ fi
+
+ echo ${CONFCACHE} ${CONFCACHE_ARG} ${TMP_CONFCACHE_DIR}
"${ECONF_SOURCE}/configure" \
--prefix=/usr \
--host=${CHOST} \
--mandir=/usr/share/man \
@@ -470,7 +485,7 @@
"$@" \
${LOCAL_EXTRA_ECONF}
- if ! "${ECONF_SOURCE}/configure" \
+ if ! ${CONFCACHE} ${CONFCACHE_ARG} ${TMP_CONFCACHE_DIR}
"${ECONF_SOURCE}/configure" \
--prefix=/usr \
--host=${CHOST} \
--mandir=/usr/share/man \
pgpu5EBoUtgFS.pgp
Description: PGP signature
