Mailinglist Archive: opensuse-buildservice (312 mails)

< Previous Next >
[opensuse-buildservice] Patch for 'build'
  • From: Joshua Plautz <jplautz@xxxxxxxx>
  • Date: Wed, 22 Jul 2009 10:55:23 -0500
  • Message-id: <4A67366B.3080903@xxxxxxxx>
I've been trying to get ccache working on one of my builds, and have
been having some issues. I've tracked the problem down to an
incorrectly generated shell script.

The setupccache function in 'build' creates a few wrapper shell scripts
to make things work (gcc/cc specifically), but the series of echos to
create the script has a typo. The first and second echo lines
both contain a single > redirect, so the first line is immediately
destroyed. The net result is the #!/bin/sh header doesn't end up in the
script file:

echo '#! /bin/sh' > $BUILD_ROOT/var/lib/build/ccache/bin/$i
echo "test -e /usr/bin/$i || exit 1" >
$BUILD_ROOT/var/lib/build/ccache/bin/$i

The second line should look like this:

echo "test -e /usr/bin/$i || exit 1" >>
$BUILD_ROOT/var/lib/build/ccache/bin/$i

A patch has been attached. I checked this out from:

https://forgesvn1.novell.com/svn/opensuse/trunk/buildservice/src/build

If that is an incorrect location to base the patch on, let me know.

Josh
Index: build
===================================================================
--- build (revision 7750)
+++ build (working copy)
@@ -235,7 +235,7 @@
rm -f $BUILD_ROOT/var/lib/build/ccache/bin/$i
test -e $BUILD_ROOT/usr/bin/$i || continue
echo '#! /bin/sh' > $BUILD_ROOT/var/lib/build/ccache/bin/$i
- echo "test -e /usr/bin/$i || exit 1" >
$BUILD_ROOT/var/lib/build/ccache/bin/$i
+ echo "test -e /usr/bin/$i || exit 1" >>
$BUILD_ROOT/var/lib/build/ccache/bin/$i
echo 'export PATH=/opt/icecream/bin:/usr/bin:$PATH' >>
$BUILD_ROOT/var/lib/build/ccache/bin/$i
echo "ccache $i \"\$@\"" >>
$BUILD_ROOT/var/lib/build/ccache/bin/$i
chmod 755 $BUILD_ROOT/var/lib/build/ccache/bin/$i

< Previous Next >
Follow Ups