| 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.1 2002/12/31 04:35:01 satai Exp $ |
4 | # $Header: /var/cvsroot/gentoo-x86/eclass/sgml-catalog.eclass,v 1.2 2003/01/02 02:20:46 satai Exp $ |
| 5 | # |
5 | # |
| 6 | |
6 | |
| 7 | inherit base |
7 | inherit base |
| 8 | INHERITED="$INHERITED $ECLASS" |
8 | INHERITED="$INHERITED $ECLASS" |
| 9 | |
9 | |
| … | |
… | |
| 35 | topindex="catcounter-1" |
35 | topindex="catcounter-1" |
| 36 | for i in `seq 0 ${topindex}` |
36 | for i in `seq 0 ${topindex}` |
| 37 | do |
37 | do |
| 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 ] |
|
|
41 | then |
|
|
42 | ewarn "${arg2} doesn't appear to exist, although it ought to!" |
|
|
43 | return |
|
|
44 | fi |
| 40 | einfo "Now adding $arg1 to $arg2 and /etc/sgml/catalog" |
45 | einfo "Now adding $arg1 to $arg2 and /etc/sgml/catalog" |
| 41 | sgml-catalog_cat_doinstall $arg1 $arg2 |
46 | sgml-catalog_cat_doinstall $arg1 $arg2 |
| 42 | done |
47 | done |
| 43 | } |
48 | } |
| 44 | |
49 | |
| 45 | sgml-catalog_pkg_prerm() { |
50 | sgml-catalog_pkg_postrm() { |
| 46 | debug-print function $FUNCNAME $* |
51 | debug-print function $FUNCNAME $* |
| 47 | declare -i topindex |
52 | declare -i topindex |
| 48 | topindex="catcounter-1" |
53 | topindex="catcounter-1" |
| 49 | for i in `seq 0 ${topindex}` |
54 | for i in `seq 0 ${topindex}` |
| 50 | do |
55 | do |
| 51 | arg1=`echo ${toinstall[$i]} | cut -f1 -d\:` |
56 | arg1=`echo ${toinstall[$i]} | cut -f1 -d\:` |
| 52 | arg2=`echo ${toinstall[$i]} | cut -f2 -d\:` |
57 | arg2=`echo ${toinstall[$i]} | cut -f2 -d\:` |
|
|
58 | if [ -e $arg2 ] |
|
|
59 | then |
|
|
60 | ewarn "${arg2} still exists! Not removing from ${arg1}" |
|
|
61 | ewarn "This is normal behavior for an upgrade..." |
|
|
62 | return |
|
|
63 | fi |
| 53 | einfo "Now removing $arg1 from $arg2 and /etc/sgml/catalog" |
64 | einfo "Now removing $arg1 from $arg2 and /etc/sgml/catalog" |
| 54 | sgml-catalog_cat_doremove $arg1 $arg2 |
65 | sgml-catalog_cat_doremove $arg1 $arg2 |
| 55 | done |
66 | done |
| 56 | } |
67 | } |
| 57 | |
68 | |
| 58 | sgml-catalog_src_compile() { |
69 | sgml-catalog_src_compile() { |
| 59 | dummy="DUMMY" |
70 | return |
| 60 | } |
71 | } |
| 61 | |
72 | |
| 62 | EXPORT_FUNCTIONS pkg_prerm pkg_postinst src_compile |
73 | EXPORT_FUNCTIONS pkg_postrm pkg_postinst src_compile |