summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Turk <satai@gentoo.org>2003-01-02 02:20:46 +0000
committerMatthew Turk <satai@gentoo.org>2003-01-02 02:20:46 +0000
commit06114d050ea8f92f5aa0b15aa351738a48588ac5 (patch)
tree62e9afd8e7c3057df9feb23caca013f5c455e703 /eclass/sgml-catalog.eclass
parenttry to fix odd crash with gnome-mime-data-2.0.1 (diff)
downloadhistorical-06114d050ea8f92f5aa0b15aa351738a48588ac5.tar.gz
historical-06114d050ea8f92f5aa0b15aa351738a48588ac5.tar.bz2
historical-06114d050ea8f92f5aa0b15aa351738a48588ac5.zip
Fixing bugs, I hope. The new behavior is NOT to remove the catalog if it still
exists, regardless. This might run into trouble for multi-tiered catalog installations, but I don't think we have any of those now, so this should solve all outstanding problems.
Diffstat (limited to 'eclass/sgml-catalog.eclass')
-rw-r--r--eclass/sgml-catalog.eclass19
1 files changed, 15 insertions, 4 deletions
diff --git a/eclass/sgml-catalog.eclass b/eclass/sgml-catalog.eclass
index 310cfe035d4a..ebc68c4d716f 100644
--- a/eclass/sgml-catalog.eclass
+++ b/eclass/sgml-catalog.eclass
@@ -1,7 +1,7 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# Author Matthew Turk <satai@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/eclass/sgml-catalog.eclass,v 1.1 2002/12/31 04:35:01 satai Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/sgml-catalog.eclass,v 1.2 2003/01/02 02:20:46 satai Exp $
#
inherit base
@@ -37,12 +37,17 @@ sgml-catalog_pkg_postinst() {
do
arg1=`echo ${toinstall[$i]} | cut -f1 -d\:`
arg2=`echo ${toinstall[$i]} | cut -f2 -d\:`
+ if [ ! -e $arg2 ]
+ then
+ ewarn "${arg2} doesn't appear to exist, although it ought to!"
+ return
+ fi
einfo "Now adding $arg1 to $arg2 and /etc/sgml/catalog"
sgml-catalog_cat_doinstall $arg1 $arg2
done
}
-sgml-catalog_pkg_prerm() {
+sgml-catalog_pkg_postrm() {
debug-print function $FUNCNAME $*
declare -i topindex
topindex="catcounter-1"
@@ -50,13 +55,19 @@ sgml-catalog_pkg_prerm() {
do
arg1=`echo ${toinstall[$i]} | cut -f1 -d\:`
arg2=`echo ${toinstall[$i]} | cut -f2 -d\:`
+ if [ -e $arg2 ]
+ then
+ ewarn "${arg2} still exists! Not removing from ${arg1}"
+ ewarn "This is normal behavior for an upgrade..."
+ return
+ fi
einfo "Now removing $arg1 from $arg2 and /etc/sgml/catalog"
sgml-catalog_cat_doremove $arg1 $arg2
done
}
sgml-catalog_src_compile() {
- dummy="DUMMY"
+ return
}
-EXPORT_FUNCTIONS pkg_prerm pkg_postinst src_compile
+EXPORT_FUNCTIONS pkg_postrm pkg_postinst src_compile