kpatch-build: less aggressive clean_cache()

Some of the provisioned machines I sometimes use don't have enough
diskspace for a full kpatch-patch build in home partition. I usually
solve this by symlinking .kpatch(and .ccache) dirs to a different
partition, however this only works with -s option because of
clean_cache().

clean_cache() currently removes .kpatch directory completely, recreating
it from scratch, change it to only remove the contents of the directory
instead.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
Artem Savkov 2018-06-18 16:35:47 +02:00
parent 63582367f4
commit d86c1113cc

View File

@ -125,7 +125,7 @@ cleanup() {
}
clean_cache() {
rm -rf "$CACHEDIR"
rm -rf "${CACHEDIR:?}/*"
mkdir -p "$TEMPDIR" || die "Couldn't create $TEMPDIR"
}