From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RCwXz-0000hC-UY for garchives@archives.gentoo.org; Sun, 09 Oct 2011 16:48:21 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8241421C41F; Sun, 9 Oct 2011 16:48:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B786321C412 for ; Sun, 9 Oct 2011 16:47:35 +0000 (UTC) Received: from localhost.localdomain (77-254-94-0.adsl.inetia.pl [77.254.94.0]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 6D32A1B4002; Sun, 9 Oct 2011 16:47:34 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH xorg-2] Update fonts.scale & fonts.dir on font removal. Date: Sun, 9 Oct 2011 18:50:00 +0200 Message-Id: <1318179000-9051-1-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.7.7 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: X-Archives-Hash: 2f3a448429ae85a380a0fe8b200fc5df 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 --- xorg-2.eclass | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/xorg-2.eclass b/xorg-2.eclass index 173f7bf..f7dee80 100644 --- a/xorg-2.eclass +++ b/xorg-2.eclass @@ -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 -- 1.7.7