diff options
author | Michał Górny <mgorny@gentoo.org> | 2011-10-14 20:27:11 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2011-10-14 20:27:11 +0000 |
commit | e21e930931c56c79d0a645262f87d4b1284a3bc1 (patch) | |
tree | c61d28be0fe69f7b0aedd14ac4bc83db1949df22 /eclass/xorg-2.eclass | |
parent | amd64 stable wrt #385699 (diff) | |
download | gentoo-2-e21e930931c56c79d0a645262f87d4b1284a3bc1.tar.gz gentoo-2-e21e930931c56c79d0a645262f87d4b1284a3bc1.tar.bz2 gentoo-2-e21e930931c56c79d0a645262f87d4b1284a3bc1.zip |
Update fonts.scale & fonts.dir on font removal.
This way, user won't end up with invalid fonts in the listings (and thus
segfaulting xfontsel).
Fixes: https://bugs.gentoo.org/show_bug.cgi?id=384649
Diffstat (limited to 'eclass/xorg-2.eclass')
-rw-r--r-- | eclass/xorg-2.eclass | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass index 173f7bf2e1ab..14e773917ec3 100644 --- a/eclass/xorg-2.eclass +++ b/eclass/xorg-2.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.49 2011/10/09 07:45:53 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.50 2011/10/14 20:27:11 mgorny Exp $ # @ECLASS: xorg-2.eclass # @MAINTAINER: @@ -478,7 +478,11 @@ xorg-2_src_install() { xorg-2_pkg_postinst() { debug-print-function ${FUNCNAME} "$@" - [[ -n ${FONT} ]] && setup_fonts "$@" + if [[ -n ${FONT} ]]; then + create_fonts_scale + create_fonts_dir + font_pkg_postinst "$@" + fi } # @FUNCTION: xorg-2_pkg_postrm @@ -488,18 +492,14 @@ xorg-2_pkg_postinst() { xorg-2_pkg_postrm() { debug-print-function ${FUNCNAME} "$@" - [[ -n ${FONT} ]] && font_pkg_postrm "$@" -} - -# @FUNCTION: setup_fonts -# @DESCRIPTION: -# Generates needed files for fonts and fixes font permissions -setup_fonts() { - debug-print-function ${FUNCNAME} "$@" - - create_fonts_scale - create_fonts_dir - font_pkg_postinst + if [[ -n ${FONT} ]]; then + # if we're doing an upgrade, postinst will do + if [[ ${EAPI} -lt 4 || -z ${REPLACED_BY_VERSION} ]]; then + create_fonts_scale + create_fonts_dir + font_pkg_postrm "$@" + fi + fi } # @FUNCTION: remove_font_metadata |