From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH xorg-2] Update fonts.scale & fonts.dir on font removal.
Date: Sun, 9 Oct 2011 18:50:00 +0200 [thread overview]
Message-ID: <1318179000-9051-1-git-send-email-mgorny@gentoo.org> (raw)
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
reply other threads:[~2011-10-09 16:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1318179000-9051-1-git-send-email-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox