/[gentoo-x86]/eclass/sgml-catalog.eclass
Gentoo

Diff of /eclass/sgml-catalog.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 Revision 1.3
1# Copyright 1999-2002 Gentoo Technologies, Inc. 1# Copyright 1999-2002 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# Author Matthew Turk <satai@gentoo.org> 3# Author Matthew Turk <satai@gentoo.org>
4# $Header: /var/cvsroot/gentoo-x86/eclass/sgml-catalog.eclass,v 1.2 2003/01/02 02:20:46 satai Exp $ 4# $Header: /var/cvsroot/gentoo-x86/eclass/sgml-catalog.eclass,v 1.3 2003/01/03 05:05:55 satai Exp $
5# 5#
6 6
7inherit base 7inherit base
8INHERITED="$INHERITED $ECLASS" 8INHERITED="$INHERITED $ECLASS"
9 9
38 arg1=`echo ${toinstall[$i]} | cut -f1 -d\:` 38 arg1=`echo ${toinstall[$i]} | cut -f1 -d\:`
39 arg2=`echo ${toinstall[$i]} | cut -f2 -d\:` 39 arg2=`echo ${toinstall[$i]} | cut -f2 -d\:`
40 if [ ! -e $arg2 ] 40 if [ ! -e $arg2 ]
41 then 41 then
42 ewarn "${arg2} doesn't appear to exist, although it ought to!" 42 ewarn "${arg2} doesn't appear to exist, although it ought to!"
43 return 43 continue
44 fi 44 fi
45 einfo "Now adding $arg1 to $arg2 and /etc/sgml/catalog" 45 einfo "Now adding $arg1 to $arg2 and /etc/sgml/catalog"
46 sgml-catalog_cat_doinstall $arg1 $arg2 46 sgml-catalog_cat_doinstall $arg1 $arg2
47 done 47 done
48 sgml-catalog_cleanup
49}
50
51sgml-catalog_pkg_prerm() {
52 sgml-catalog_cleanup
48} 53}
49 54
50sgml-catalog_pkg_postrm() { 55sgml-catalog_pkg_postrm() {
51 debug-print function $FUNCNAME $* 56 debug-print function $FUNCNAME $*
52 declare -i topindex 57 declare -i topindex
57 arg2=`echo ${toinstall[$i]} | cut -f2 -d\:` 62 arg2=`echo ${toinstall[$i]} | cut -f2 -d\:`
58 if [ -e $arg2 ] 63 if [ -e $arg2 ]
59 then 64 then
60 ewarn "${arg2} still exists! Not removing from ${arg1}" 65 ewarn "${arg2} still exists! Not removing from ${arg1}"
61 ewarn "This is normal behavior for an upgrade..." 66 ewarn "This is normal behavior for an upgrade..."
62 return 67 continue
63 fi 68 fi
64 einfo "Now removing $arg1 from $arg2 and /etc/sgml/catalog" 69 einfo "Now removing $arg1 from $arg2 and /etc/sgml/catalog"
65 sgml-catalog_cat_doremove $arg1 $arg2 70 sgml-catalog_cat_doremove $arg1 $arg2
66 done 71 done
67} 72}
68 73
74sgml-catalog_cleanup() {
75 if [ -e /usr/bin/gensgmlenv ]
76 then
77 einfo Regenerating SGML environment variables...
78 gensgmlenv
79 grep -v export /etc/sgml/sgml.env > /etc/env.d/93sgmltools-lite
80 fi
81}
82
69sgml-catalog_src_compile() { 83sgml-catalog_src_compile() {
70 return 84 return
71} 85}
72 86
73EXPORT_FUNCTIONS pkg_postrm pkg_postinst src_compile 87EXPORT_FUNCTIONS pkg_postrm pkg_postinst src_compile pkg_prerm

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20