From 5f62370a88efeeb47a58fe1c1de9b7341933334e Mon Sep 17 00:00:00 2001 From: Ryan Hill Date: Sun, 16 Sep 2007 06:21:05 +0000 Subject: Move permission checking to postinst/postrm, and check everything in /usr/share/fonts rather than just the current package. --- eclass/font.eclass | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'eclass') diff --git a/eclass/font.eclass b/eclass/font.eclass index 0c34d4ac135e..0e2efc241ef6 100644 --- a/eclass/font.eclass +++ b/eclass/font.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.29 2007/09/16 02:20:05 dirtyepic Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.30 2007/09/16 06:21:05 dirtyepic Exp $ # Author: foser @@ -84,8 +84,6 @@ font_src_install() { for suffix in ${FONT_SUFFIX}; do doins *.${suffix} - # ensure fonts are world readable to prevent fontconfig segfaults - chmod 0644 ${D}${FONTDIR}/*.${suffix} done rm -f fonts.{dir,scale} encodings.dir @@ -110,6 +108,9 @@ font_pkg_setup() { } font_pkg_postinst() { + find /usr/share/fonts/ -type f \! -perm 0644 -print0 \ + | xargs -0 chmod 0644 2&>/dev/null + if has_version '>=media-libs/fontconfig-2.4'; then if [ ${ROOT} == "/" ]; then ebegin "Updating global fontcache" @@ -120,6 +121,9 @@ font_pkg_postinst() { } font_pkg_postrm() { + find /usr/share/fonts/ -type f \! -perm 0644 -print0 \ + | xargs -0 chmod 0644 2&>/dev/null + if has_version '>=media-libs/fontconfig-2.4'; then if [ ${ROOT} == "/" ]; then ebegin "Updating global fontcache" -- cgit v1.2.3-65-gdbad