summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2010-10-24 16:22:33 +0000
committerAlexis Ballier <aballier@gentoo.org>2010-10-24 16:22:33 +0000
commit6fe2bba616931eacbd5770a7071722a58e5f6dec (patch)
tree595bbf84ef648ae8f5c582d02f800ec75fc7ede8 /eclass/texlive-common.eclass
parentVersion bump KDEPIM 4.4.7 (diff)
downloadgentoo-2-6fe2bba616931eacbd5770a7071722a58e5f6dec.tar.gz
gentoo-2-6fe2bba616931eacbd5770a7071722a58e5f6dec.tar.bz2
gentoo-2-6fe2bba616931eacbd5770a7071722a58e5f6dec.zip
Add etexmf-update to call texmf-update from ebuilds so that some duplicated code can be factorized
Diffstat (limited to 'eclass/texlive-common.eclass')
-rw-r--r--eclass/texlive-common.eclass18
1 files changed, 17 insertions, 1 deletions
diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 4ca90247d7a1..49dea8094960 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-common.eclass,v 1.13 2010/10/24 04:35:59 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-common.eclass,v 1.14 2010/10/24 16:22:33 aballier Exp $
# @ECLASS: texlive-common.eclass
# @MAINTAINER:
@@ -126,3 +126,19 @@ dobin_texmf_scripts() {
shift
done
}
+
+# @FUNCTION: etexmf-update
+# @USAGE: In ebuilds' pkg_postinst and pkg_postrm phases
+# @DESCRIPTION:
+# Runs texmf-update if it is available and prints a warning otherwise. This
+# function helps in factorizing some code.
+
+etexmf-update() {
+ if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then
+ /usr/sbin/texmf-update
+ else
+ ewarn "Cannot run texmf-update for some reason."
+ ewarn "Your texmf tree might be inconsistent with your configuration"
+ ewarn "Please try to figure what has happened"
+ fi
+}