1 |
This way, user won't end up with invalid fonts in the listings (and thus |
2 |
segfaulting xfontsel). |
3 |
|
4 |
Fixes: https://bugs.gentoo.org/show_bug.cgi?id=384649 |
5 |
--- |
6 |
xorg-2.eclass | 26 +++++++++++++------------- |
7 |
1 files changed, 13 insertions(+), 13 deletions(-) |
8 |
|
9 |
diff --git a/xorg-2.eclass b/xorg-2.eclass |
10 |
index 173f7bf..f7dee80 100644 |
11 |
--- a/xorg-2.eclass |
12 |
+++ b/xorg-2.eclass |
13 |
@@ -478,7 +478,11 @@ xorg-2_src_install() { |
14 |
xorg-2_pkg_postinst() { |
15 |
debug-print-function ${FUNCNAME} "$@" |
16 |
|
17 |
- [[ -n ${FONT} ]] && setup_fonts "$@" |
18 |
+ if [[ -n ${FONT} ]]; then |
19 |
+ create_fonts_scale |
20 |
+ create_fonts_dir |
21 |
+ font_pkg_postinst "$@" |
22 |
+ fi |
23 |
} |
24 |
|
25 |
# @FUNCTION: xorg-2_pkg_postrm |
26 |
@@ -488,18 +492,14 @@ xorg-2_pkg_postinst() { |
27 |
xorg-2_pkg_postrm() { |
28 |
debug-print-function ${FUNCNAME} "$@" |
29 |
|
30 |
- [[ -n ${FONT} ]] && font_pkg_postrm "$@" |
31 |
-} |
32 |
- |
33 |
-# @FUNCTION: setup_fonts |
34 |
-# @DESCRIPTION: |
35 |
-# Generates needed files for fonts and fixes font permissions |
36 |
-setup_fonts() { |
37 |
- debug-print-function ${FUNCNAME} "$@" |
38 |
- |
39 |
- create_fonts_scale |
40 |
- create_fonts_dir |
41 |
- font_pkg_postinst |
42 |
+ if [[ -n ${FONT} ]]; then |
43 |
+ # if we're doing an upgrade, postinst will do |
44 |
+ if [[ ${EAPI} -lt 4 || -z ${REPLACED_BY_VERSION} ]]; then |
45 |
+ create_fonts_scale |
46 |
+ create_fonts_dir |
47 |
+ font_pkg_postrm "$@" |
48 |
+ fi |
49 |
+ fi |
50 |
} |
51 |
|
52 |
# @FUNCTION: remove_font_metadata |
53 |
-- |
54 |
1.7.7 |