Closed JotaRandom closed 9 years ago
Let me explain again.
This is an *.install
file:
post_install() {
fc-cache -f /usr/share/fonts/otf-arsenal-ibx > /dev/null
echo "Done."
}
post_upgrade() {
post_install $1
}
post_remove() {
fc-cache -sf > /dev/null
echo "Done."
}
op=$1
shift
$op $*
What each section does:
post_install
: scans only the given directory, not the entire font collection. Adding the -s
option won't affect/improve the performance in any way (it just does what it should). If we replaced -f
with -s
, we could remove the directory because -s
given for the entire cache has exactly the same performance.post_upgrade
: works and performs in the same manner as 1).post_remove
: here we used -fs
because we wanted to refresh the entire system-wide cache, which is what -s
does (not using it would refresh the user cache, too).What we can do with the above:
post_remove
array, which in Arch is now using -s
only. Hence when you remove the official package, the operation will last significantly shorter than the removal of the bundle one.-s
only (which also means removing the directory parameter from the post_install
array because using it makes no sense then).Right now if we did what you've suggested, we'd have returned to the pre-#19 state which is what we don't really want. All in all, let's just leave it as is and when I'm free I'll do my job, OK? :-)
Edit
The new file should contain the following:
post_install() {
echo -n "Updating font cache... "
fc-cache -s
echo "Done."
}
post_upgrade() {
post_install $1
}
post_remove() {
post_install $1
}
I let the pstremove as -sf as you say that without the -f the thing could give problem. the post install now use only the -s
I said it conditionally: it could, which doesn't mean it always does. The -f
option should be used for system maintenance, to force rebuilding of the cache (the -r
option goes even further: it first removes the entire cache and then rebuilds it). And if you're asking about release numbers: yes, if we're going to update all packages, we have to change the numbers, too. ;-)
Thanks, by the way. :-)
I know that the release number will increment (yay I have all teh fonts installed [using ttf over otf or t1]) So first want to be sure that the .install is ok so it will not be needed to touch them again.
If you are ok with the actual state or want change something tell. otherwise (or whatever the word is) I will proced to start change the pkgrel()s
Just make sure that the content of each foo.install
file for font packages (leave the libraries intact) is the same as in the snippet at the bottom of this post.
Added all the pkgver, the post_install but I let the post_remove and post_upgrade intact because is better to be safe than sorry.
As commented in #64 I add to ALL the -sf option. Is ok or you want sclude some archives?