<div dir="ltr">Hi,<div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">> ccache seems to ignore the request [...] </span><span style="font-family:arial,sans-serif;font-size:13px">Is there some ccache subtlety I'm missing?</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">ccache doesn't ignore the request, it just happens to make sure that the ccache directory exists before reacting to CCACHE_DISABLE (or CCACHE_READONLY)... Looks like it has been that way since day one (well, day two, actually: </span><font face="arial, sans-serif"><a href="http://gitweb.samba.org/?p=ccache.git;a=commit;h=10920460b5b00b77316602eb4e7c998a80464a88">http://gitweb.samba.org/?p=ccache.git;a=commit;h=10920460b5b00b77316602eb4e7c998a80464a88</a>).</font></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">I've fixed the bug now (upstream), but there's no workaround in currently released ccache versions, I'm afraid.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">-- Joel</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 30 August 2013 00:03, Yann Dirson <span dir="ltr"><<a href="mailto:ydirson@free.fr" target="_blank">ydirson@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
By tuning the stap script to SIGSTOP the offending process, we can get<br>
a much better view of the situation - here using pstree:<br>
<br>
pbuilder,4611 /usr/sbin/pbuilder --build --buildresult .. --debbuildopts  --debbuildopts -i ../cssc_1.3.0-1.dsc<br>
  └─pbuilder-buildp,4612 /usr/lib/pbuilder/pbuilder-buildpackage --buildresult .. --debbuildopts  --debbuildopts -i ../cssc_1.3.0-1.dsc<br>
      └─pbuilder-satisf,5767 /usr/lib/pbuilder/pbuilder-satisfydepends --control ../cssc_1.3.0-1.dsc --chroot /work/pbuilder/build//4612 --internal-chrootexec chroot /work/pbuilder/build//4612  --binary-all<br>
          └─pbuilder-satisf,5768 /usr/lib/pbuilder/pbuilder-satisfydepends --control ../cssc_1.3.0-1.dsc --chroot /work/pbuilder/build//4612 --internal-chrootexec chroot /work/pbuilder/build//4612  --binary-all<br>
              └─dpkg-architectu,5769 /usr/bin/dpkg-architecture -qDEB_HOST_ARCH<br>
                  └─sh,5770 -c ${CC:-gcc} -dumpmachine<br>
                      └─gcc,5771 -dumpmachine<br>
<br>
A quick test can be done of reqesting disabling of ccache while calling dpkg-architecture.<br>
<br>
Test:<br>
<br>
--- /usr/lib/pbuilder/pbuilder-satisfydepends.orig      2013-08-29 23:34:32.000000000 +0200<br>
+++ /usr/lib/pbuilder/pbuilder-satisfydepends   2013-08-29 23:36:23.000000000 +0200<br>
@@ -59,7 +59,7 @@<br>
<br>
 function checkbuilddep_internal () {<br>
 # Use this function to fulfill the dependency (almost)<br>
-    local ARCH=$($CHROOTEXEC dpkg-architecture -qDEB_HOST_ARCH)<br>
+    local ARCH=$($CHROOTEXEC env CCACHE_DISABLE=1 dpkg-architecture -qDEB_HOST_ARCH)<br>
     local BUILD_DEP_DEB_DIR<br>
     local BUILD_DEP_DEB_CONTROL<br>
     local DEPENDS<br>
<br>
For some reason, the stap script still traps a mkdir done as root,<br>
while I can check through /proc that dpkg-architecture and gcc do have<br>
CCACHE_DISABLE=1 in their env.<br>
<br>
Another try: if ccache ignores the disable request, maybe we can ask<br>
it not to touch the cache ?<br>
<br>
--- /usr/lib/pbuilder/pbuilder-satisfydepends.orig      2013-08-29 23:34:32.000000000 +0200<br>
+++ /usr/lib/pbuilder/pbuilder-satisfydepends   2013-08-29 23:56:48.000000000 +0200<br>
@@ -59,7 +59,7 @@<br>
<br>
 function checkbuilddep_internal () {<br>
 # Use this function to fulfill the dependency (almost)<br>
-    local ARCH=$($CHROOTEXEC dpkg-architecture -qDEB_HOST_ARCH)<br>
+    local ARCH=$($CHROOTEXEC env CCACHE_READONLY=1 CCACHE_TEMPDIR=${TMPDIR:-/tmp} dpkg-architecture -qDEB_HOST_ARCH)<br>
     local BUILD_DEP_DEB_DIR<br>
     local BUILD_DEP_DEB_CONTROL<br>
     local DEPENDS<br>
<br>
... but similarly, ccache seems to ignore the request, which can be<br>
seen in the processes' env.<br>
<br>
<br>
Is there some ccache subtlety I'm missing ?  Could ccache maints lend a hand here ?<br>
<br>
Best regards,<br>
<span class="HOEnZb"><font color="#888888">--<br>
Yann<br>
<br>
</font></span></blockquote></div><br></div>