On Wed, 2020-07-15 at 16:57 +0100, Daniel P. Berrangé wrote: > On Fri, Mar 27, 2020 at 08:34:59PM +0100, Andrea Bolognani wrote: > > + commands.extend([ > > + "mkdir -p /usr/local/share/ccache-wrappers", > > + ]) > > + > > + if cross_arch: > > + commands.extend([ > > + "ln -s {ccache} /usr/local/share/ccache-wrappers/{cross_abi}-cc", > > + "ln -s {ccache} /usr/local/share/ccache-wrappers/{cross_abi}-$(basename {cc})", > > + ]) > > + else: > > + commands.extend([ > > + "ln -s {ccache} /usr/local/share/ccache-wrappers/cc", > > + "ln -s {ccache} /usr/local/share/ccache-wrappers/$(basename {cc})", > > + ]) > > + > > script = "\nRUN " + (" && \\\n ".join(commands)) + "\n" > > sys.stdout.write(script.format(**varmap)) > > I've just realized that this addition has prevented the caching and > reuse the base layer across the cross images. The first "RUN" cmmand > was supposed to have stuff that is common across cross images, but > we've accidentally included the "cross_abi" in the path for ccache > here. > > We need to put the ccache setup in the second RUN command, for cross > containers. Only native images can have it in the first RUN command. Yeah, I realized that a while ago but always forgot to send out a patch :) Do you want to take a stab at it? -- Andrea Bolognani / Red Hat / Virtualization