Deleting data files whilst bitbake is running isn't a great idea.
Make sure memory resident bitbake is stopped if present and make
the file deletions a little more specific and safer too while we're
here.
Note: The cache directory layout is different on older releases (some
are split level) so this won't be a direct backport to some.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
clean_cache()
{
s=`bitbake -e | grep ^CACHE= | cut -f2 -d\"`
+ # Stop any active memory resident server
+ bitbake -m
+ # Remove cache entries since we want to trigger a full reparse
if [ "x${s}" != "x" ]; then
- rm -rf ${s}
+ rm -f ${s}/bb_cache*.dat.*
fi
}
return 1
fi
- rm -rf $df
+ rm -f $df
clean_cache
echo "Exporting LOCALCOUNT to AUTOINCs..."
bitbake -R conf/migrate_localcount.conf -p