Commit 724d4ecd authored by Markus Frosch's avatar Markus Frosch
Browse files

rpm: Fix being able to build without ccache

parent 2fb163fd
Pipeline #4339 failed with stage
in 30 seconds
......@@ -59,15 +59,17 @@ case "$ICINGA_BUILD_OS" in
;;
esac
echo "[ Preparing ccache for our environment ]"
export CCACHE_DIR="${WORKDIR}/ccache"
rm -f ccache.stats
test -d "${CCACHE_DIR}" || mkdir "${CCACHE_DIR}"
preconfigure_ccache
if command -v ccache &>/dev/null; then
echo "[ Preparing ccache for our environment ]"
export CCACHE_DIR="${WORKDIR}/ccache"
rm -f ccache.stats
test -d "${CCACHE_DIR}" || mkdir "${CCACHE_DIR}"
preconfigure_ccache
# reset ccache statistics
# so we now the statistics of the new build
ccache -z # (--zero-stats)
# reset ccache statistics
# so we now the statistics of the new build
ccache -z # (--zero-stats)
fi
echo "[ Building binary package ]"
eval "$(get_rpmbuild --rebuild "${source_rpm}")"
......@@ -86,9 +88,11 @@ eval "$(get_rpmbuild --rebuild "${source_rpm}")"
fi
)
echo "[ ccache stats ]"
ccache -s | tee build/ccache-stats.txt # (--show-stats)
echo
if command -v ccache &>/dev/null; then
echo "[ ccache stats ]"
ccache -s | tee build/ccache-stats.txt # (--show-stats)
echo
fi
echo "[ Running rpmlint ]"
(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment