Page 1 of 1

[Solved] Registration of "FontPack" Modules.

Posted: 12 May 2012, 09:19
by pumbaa2
This is minor really but wanted to bring it up. I created a "Font Pack" from my Slackware distro and diff'ed out all the fonts that are already included in Porteus. I only did this because MythTV was complaining in the logs that is was missing Fonts needed for specific themes that I use. Upon activation the Fonts are still not visible unless you manually run fc-cache, after that, all is well. Anyhow, I suggest that fc-cache be added to the list of things to update during activation or deactivation of modules. :D

Re: Registration of "FontPack" Modules.

Posted: 12 May 2012, 10:40
by fanthom
hello pumbaa2,

except of fonts i have added 3 other checks to activate (not sure if we really need them in deactivate as everything worked well so far):

Code: Select all

fonts=`ls $MOD/usr/share/fonts 2>/dev/null | wc -l`
if [ $fonts -gt 0 ]; then
    echo "Updating X font indexes:  /usr/bin/fc-cache -f"
    /usr/bin/fc-cache -f
fi

schemas=`ls $MOD/usr/share/glib-2.0/schemas 2>/dev/null | wc -l`
if [ $schemas -gt 0 ]; then
    echo "Updating glib schemas: /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas"
    /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas
fi

gio=`ls $MOD/usr/lib64/gio/modules 2>/dev/null | wc -l`
if [ $gio -gt 0 ]; then
    echo "Updating GIO cache: /usr/bin/gio-querymodules /usr/lib64/gio/modules"
    /usr/bin/gio-querymodules /usr/lib64/gio/modules
fi

certs=`ls $MOD/etc/ssl/certs 2>/dev/null | wc -l`
if [ $certs -gt 0 ]; then
    echo "Updating certificates in /etc/ssl/certs: /usr/sbin/update-ca-certificates --fresh"
    /usr/sbin/update-ca-certificates --fresh >/dev/null 2>&1
fi
(32bit version has /lib path instead of lib64) so we should have full cover now.

seems that GTK+/gdk/pango modules are never held in xzm's other than 002-xorg so no point for updating them.

thanks

Re: Registration of "FontPack" Modules.

Posted: 12 May 2012, 10:51
by pumbaa2
I would leave it in the deactivate just to be on the safe side. Modules containing libraries or fonts that are in the cache but actually missing may lead to very interesting results. :D

Re: Registration of "FontPack" Modules.

Posted: 12 May 2012, 13:12
by fanthom
done for 'deactivate' as well - thanks once again.

[Solved] Registration of "FontPack" Modules.

Posted: 13 May 2012, 07:17
by pumbaa2
Awesome, thanks. :)