[Kde-scm-interest] superbuild: git clone dir gets removed when rebuilding cache

Valentin Rusu kde at rusu.info
Sat Dec 17 10:47:57 UTC 2011


Hello Alex,

Looking for a hint to better superbuild.
Here is my case (once again :) )

I configured superbuild to get the sources in a separate, global, 
directory. I added this into the GlobalSuperbuildOptions.cmake:

set(SB_SRC_CLONE_DIR $ENV{KDEDIR}/src)
(please see my last commit 3ec2909821e408fad6, which introduces this 
variable)

I then do this:
cd kdesupport/
mkdir build
cd build
cmake ..
cmake-gui .. [then I configure the build]
make

Please note that before doing this, my KDEDIR/src already has clones of 
the ldesupport components.
However, doing make would delete the corresponding directories, then 
re-clone them.
Here is an example of the output for LibStreamAnalyzer

Scanning dependencies of target LibStreamAnalyzer
[ 50%] Creating directories for 'LibStreamAnalyzer'
[ 50%] Performing download step (git clone) for 'LibStreamAnalyzer'
Cloning into 'LibStreamAnalyzer'...
remote: Counting objects: 24940, done.
remote: Compressing objects: 100% (5085/5085), done.
remote: Total 24940 (delta 19797), reused 24940 (delta 19797)
Receiving objects: 100% (24940/24940), 4.69 MiB | 1.82 MiB/s, done.
Resolving deltas: 100% (19797/19797), done.
Already on 'master'
[ 50%] [ 50%] No patch step for 'LibStreamAnalyzer'
Performing update step for 'LibStreamAnalyzer'
Already up-to-date.
[ 50%] Performing configure step for 'LibStreamAnalyzer'

Now, suppose I have done some work into LibStreamAnalyzer. In fact I 
did, as it's FindCLucene1.cmake uses pkgconfig, and the clucene-core.pc 
is broken (I fix that, but that's another point).

After doing
rm -rf kdesupport/build/*
I executed the steps above and my local modification were gone!

cd $KDEDIR/src
cd LibStreamAnalyzer
git status
# On branch master
nothing to commit (working directory clean)

So here is my problem with superbuild: I need to find a method to keep 
it removing clone directory if it's already existing. E.g. it should 
only do "git pull" into the existing $KDEDIR/src/LibStreamAnalyzer, then 
continue as usual.

Any hint, please?

Cheers,

-- 
Valentin Rusu (IRC valir, KDE vrusu)
KSecretsService (former KSecretService, KWallet replacement)



More information about the Kde-scm-interest mailing list