/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

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

Revision 1.275 Revision 1.276
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 Gentoo Foundation
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# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.275 2007/02/17 00:17:39 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.276 2007/02/18 03:11:46 vapier Exp $
4# 4#
5# This eclass is for general purpose functions that most ebuilds 5# This eclass is for general purpose functions that most ebuilds
6# have to implement themselves. 6# have to implement themselves.
7# 7#
8# NB: If you add anything, please comment it! 8# NB: If you add anything, please comment it!
1581# } 1581# }
1582 1582
1583preserve_old_lib() { 1583preserve_old_lib() {
1584 if [[ ${EBUILD_PHASE} != "preinst" ]] ; then 1584 if [[ ${EBUILD_PHASE} != "preinst" ]] ; then
1585 eerror "preserve_old_lib() must be called from pkg_preinst() only" 1585 eerror "preserve_old_lib() must be called from pkg_preinst() only"
1586# die "Invalid preserve_old_lib() usage" 1586 die "Invalid preserve_old_lib() usage"
1587 fi 1587 fi
1588 [[ -z $1 ]] && die "Usage: preserve_old_lib <library to preserve> [more libraries to preserve]" 1588 [[ -z $1 ]] && die "Usage: preserve_old_lib <library to preserve> [more libraries to preserve]"
1589 1589
1590 local lib dir 1590 local lib dir
1591 for lib in "$@" ; do 1591 for lib in "$@" ; do
1598} 1598}
1599 1599
1600preserve_old_lib_notify() { 1600preserve_old_lib_notify() {
1601 if [[ ${EBUILD_PHASE} != "postinst" ]] ; then 1601 if [[ ${EBUILD_PHASE} != "postinst" ]] ; then
1602 eerror "preserve_old_lib_notify() must be called from pkg_postinst() only" 1602 eerror "preserve_old_lib_notify() must be called from pkg_postinst() only"
1603# die "Invalid preserve_old_lib_notify() usage" 1603 die "Invalid preserve_old_lib_notify() usage"
1604 fi 1604 fi
1605 1605
1606 local lib notice=0 1606 local lib notice=0
1607 for lib in "$@" ; do 1607 for lib in "$@" ; do
1608 [[ -e ${ROOT}/${lib} ]] || continue 1608 [[ -e ${ROOT}/${lib} ]] || continue

Legend:
Removed from v.1.275  
changed lines
  Added in v.1.276

  ViewVC Help
Powered by ViewVC 1.1.20