fontconfig: allow to disable auto font cache update
Each time fontconfig is installed or updated, a lengthy process of font cache update is started automatically. In certain use-cases, f.e. when one if its dependents is used for automated build purposes, this causes an unnecessary and unwanted delay in the process. On AppVeyor CI free-tier in particular, this process takes about 5 minutes. This patch adds the ability to disable this automatic font cache update, by setting the environment variable `MSYS2_FC_CACHE_SKIP` to any non-empty value, prior to lauching `pacman`.
This commit is contained in:
@@ -6,15 +6,23 @@ post_install() {
|
||||
|
||||
_EOF
|
||||
|
||||
echo -n "updating font cache... "
|
||||
mingw32/bin/fc-cache -f
|
||||
echo "done."
|
||||
if [ -n "${MSYS2_FC_CACHE_SKIP}" ]; then
|
||||
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
|
||||
else
|
||||
echo -n "updating font cache... "
|
||||
mingw32/bin/fc-cache -f
|
||||
echo "done."
|
||||
fi
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
echo -n "updating font cache... "
|
||||
mingw32/bin/fc-cache -f
|
||||
echo "done."
|
||||
if [ -n "${MSYS2_FC_CACHE_SKIP}" ]; then
|
||||
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
|
||||
else
|
||||
echo -n "updating font cache... "
|
||||
mingw32/bin/fc-cache -f
|
||||
echo "done."
|
||||
fi
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
@@ -24,4 +32,4 @@ post_remove() {
|
||||
in mingw32/etc/fonts/conf.d/
|
||||
|
||||
_EOF
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,15 +6,23 @@ post_install() {
|
||||
|
||||
_EOF
|
||||
|
||||
echo -n "updating font cache... "
|
||||
mingw64/bin/fc-cache -f
|
||||
echo "done."
|
||||
if [ -n "${MSYS2_FC_CACHE_SKIP}" ]; then
|
||||
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
|
||||
else
|
||||
echo -n "updating font cache... "
|
||||
mingw64/bin/fc-cache -f
|
||||
echo "done."
|
||||
fi
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
echo -n "updating font cache... "
|
||||
mingw64/bin/fc-cache -f
|
||||
echo "done."
|
||||
if [ -n "${MSYS2_FC_CACHE_SKIP}" ]; then
|
||||
echo "Warning: 'MSYS2_FC_CACHE_SKIP' set, skipping font cache update"
|
||||
else
|
||||
echo -n "updating font cache... "
|
||||
mingw64/bin/fc-cache -f
|
||||
echo "done."
|
||||
fi
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
|
||||
Reference in New Issue
Block a user