Idea:

Example: /usr/lib/gcc-snapshot/bin/gcc

Add a diversion to /usr/lib/gcc-snapshot/bin/gcc.bin

dpkg-divert --package ccache --rename --divert 
/usr/lib/gcc-snapshot/bin/gcc.bin --add /usr/lib/gcc-snapshot/bin/gcc

Create a tiny script: /usr/lib/ccache/ccache.helper

#!/bin/sh
ccache $0.bin $*

And symlink:
ln -s /usr/lib/ccache/ccache.helper /usr/lib/gcc-snapshot/bin/gcc

Watch out that $0.bin may be a relative path, so keep track of the current directory when running it.

Because this is pretty intrusive, make it a question during installation if dpkg should do this, or give the user some method of entering specific filenames of things that should pass through ccache this way.

If it made specific for gcc-snapshot, use dpkg triggers to keep track of if gcc-snapshot is added after ccache was already installed.

        -Ariel



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to