diff options
author | Leonardo Boshell <leonardop@gentoo.org> | 2005-07-15 17:01:14 +0000 |
---|---|---|
committer | Leonardo Boshell <leonardop@gentoo.org> | 2005-07-15 17:01:14 +0000 |
commit | acd5fbfd19f70d54d6c9ad2d8d3244bc6f203501 (patch) | |
tree | 51eba8f2a1c8cb3f5d8e0125781dbb74b82fc6bc /eclass | |
parent | Don't call sgml-catalog_cat_include from pkg_setup() (bug #98680) (diff) | |
download | gentoo-2-acd5fbfd19f70d54d6c9ad2d8d3244bc6f203501.tar.gz gentoo-2-acd5fbfd19f70d54d6c9ad2d8d3244bc6f203501.tar.bz2 gentoo-2-acd5fbfd19f70d54d6c9ad2d8d3244bc6f203501.zip |
Revert previous commit (bug #98680)
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/sgml-catalog.eclass | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/eclass/sgml-catalog.eclass b/eclass/sgml-catalog.eclass index 5c12985ed262..e3111b46d404 100644 --- a/eclass/sgml-catalog.eclass +++ b/eclass/sgml-catalog.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/sgml-catalog.eclass,v 1.12 2005/07/15 13:50:19 leonardop Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/sgml-catalog.eclass,v 1.13 2005/07/15 17:01:14 leonardop Exp $ # # Author Matthew Turk <satai@gentoo.org> @@ -8,16 +8,13 @@ inherit base DEPEND=">=app-text/sgml-common-0.6.3-r2" -sgml-catalog_cat_include() { - [ -z "${WORKDIR}" ] && return - - local catalogdir="${WORKDIR}/catalogs" - local catalogfile="${catalogdir}/data" +declare -a toinstall +declare -i catcounter +let "catcounter=0" +sgml-catalog_cat_include() { debug-print function $FUNCNAME $* - - [ ! -d "$catalogdir" ] && mkdir -p $catalogdir - echo "${1}:${2}" >> $catalogfile + toinstall["catcounter++"]="${1}:${2}" } sgml-catalog_cat_doinstall() { @@ -31,16 +28,13 @@ sgml-catalog_cat_doremove() { } sgml-catalog_pkg_postinst() { - local catalogdir="${WORKDIR}/catalogs" - local catalogfile="${catalogdir}/data" - debug-print function $FUNCNAME $* - - local toinstall - cat ${catalogfile} | while read toinstall + declare -i topindex + topindex="catcounter-1" + for i in `seq 0 ${topindex}` do - arg1=`echo ${toinstall} | cut -f1 -d\:` - arg2=`echo ${toinstall} | cut -f2 -d\:` + 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!" @@ -57,16 +51,13 @@ sgml-catalog_pkg_prerm() { } sgml-catalog_pkg_postrm() { - local catalogdir="${WORKDIR}/catalogs" - local catalogfile="${catalogdir}/data" - debug-print function $FUNCNAME $* - - local toinstall - cat ${catalogfile} | while read toinstall + declare -i topindex + topindex="catcounter-1" + for i in `seq 0 ${topindex}` do - arg1=`echo ${toinstall} | cut -f1 -d\:` - arg2=`echo ${toinstall} | cut -f2 -d\:` + 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}" |