summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorRyan Hill <rhill@gentoo.org>2010-07-04 20:42:22 +0000
committerRyan Hill <rhill@gentoo.org>2010-07-04 20:42:22 +0000
commit81c45f110c17ec4c33a717adf283228518d8433d (patch)
tree8aa2afba32297f94b7e31a495a8c82dfb1f5e6b9 /eclass
parentSupport multiple python ABIs. (bug #326125) (diff)
downloadhistorical-81c45f110c17ec4c33a717adf283228518d8433d.tar.gz
historical-81c45f110c17ec4c33a717adf283228518d8433d.tar.bz2
historical-81c45f110c17ec4c33a717adf283228518d8433d.zip
Drop cleanup_fonts from xorg eclasses as it's now handled by font.eclass. (bug #315369)
Diffstat (limited to 'eclass')
-rw-r--r--eclass/x-modular.eclass42
-rw-r--r--eclass/xorg-2.eclass37
2 files changed, 2 insertions, 77 deletions
diff --git a/eclass/x-modular.eclass b/eclass/x-modular.eclass
index b7ba3f0c49f9..e404d332e92c 100644
--- a/eclass/x-modular.eclass
+++ b/eclass/x-modular.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.118 2009/12/09 10:21:49 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.119 2010/07/04 20:42:22 dirtyepic Exp $
#
# @ECLASS: x-modular.eclass
# @MAINTAINER:
@@ -498,50 +498,10 @@ x-modular_pkg_postinst() {
# task right now is some cleanup for font packages.
x-modular_pkg_postrm() {
if [[ -n "${FONT}" ]]; then
- cleanup_fonts
font_pkg_postrm
fi
}
-# @FUNCTION: cleanup_fonts
-# @USAGE:
-# @DESCRIPTION:
-# Get rid of font directories that only contain generated files
-cleanup_fonts() {
- local ALLOWED_FILES="encodings.dir fonts.alias fonts.cache-1 fonts.dir fonts.scale"
- for DIR in ${FONT_DIR}; do
- unset KEEP_FONTDIR
- REAL_DIR=${ROOT}usr/share/fonts/${DIR}
-
- ebegin "Checking ${REAL_DIR} for useless files"
- pushd ${REAL_DIR} &> /dev/null
- for FILE in *; do
- unset MATCH
- for ALLOWED_FILE in ${ALLOWED_FILES}; do
- if [[ ${FILE} = ${ALLOWED_FILE} ]]; then
- # If it's allowed, then move on to the next file
- MATCH="yes"
- break
- fi
- done
- # If we found a match in allowed files, move on to the next file
- if [[ -n ${MATCH} ]]; then
- continue
- fi
- # If we get this far, there wasn't a match in the allowed files
- KEEP_FONTDIR="yes"
- # We don't need to check more files if we're already keeping it
- break
- done
- popd &> /dev/null
- # If there are no files worth keeping, then get rid of the dir
- if [[ -z "${KEEP_FONTDIR}" ]]; then
- rm -rf ${REAL_DIR}
- fi
- eend 0
- done
-}
-
# @FUNCTION: setup_fonts
# @USAGE:
# @DESCRIPTION:
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass
index bea3ef8f6059..a8918d6d9714 100644
--- a/eclass/xorg-2.eclass
+++ b/eclass/xorg-2.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.4 2010/06/08 20:22:12 remi Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.5 2010/07/04 20:42:22 dirtyepic Exp $
#
# @ECLASS: xorg-2.eclass
# @MAINTAINER:
@@ -357,45 +357,10 @@ xorg-2_pkg_postinst() {
# task right now is some cleanup for font packages.
xorg-2_pkg_postrm() {
if [[ -n ${FONT} ]]; then
- cleanup_fonts
font_pkg_postrm
fi
}
-# @FUNCTION: cleanup_fonts
-# @USAGE:
-# @DESCRIPTION:
-# Get rid of font directories that only contain generated files
-cleanup_fonts() {
- local allowed_files="encodings.dir fonts.alias fonts.cache-1 fonts.dir fonts.scale"
- local real_dir=${EROOT}usr/share/fonts/${FONT_DIR}
- local fle allowed_file
-
- unset KEEP_FONTDIR
-
- einfo "Checking ${real_dir} for useless files"
- pushd ${real_dir} &> /dev/null
- for fle in *; do
- unset MATCH
- for allowed_file in ${allowed_files}; do
- if [[ ${fle} = ${allowed_file} ]]; then
- # If it's allowed, then move on to the next file
- MATCH="yes"
- break
- fi
- done
- # If we found a match in allowed files, move on to the next file
- [[ -n ${MATCH} ]] && continue
- # If we get this far, there wasn't a match in the allowed files
- KEEP_FONTDIR="yes"
- # We don't need to check more files if we're already keeping it
- break
- done
- popd &> /dev/null
- # If there are no files worth keeping, then get rid of the dir
- [[ -z "${KEEP_FONTDIR}" ]] && rm -rf ${real_dir}
-}
-
# @FUNCTION: setup_fonts
# @USAGE:
# @DESCRIPTION: