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

Diff of /eclass/eutils.eclass

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

Revision 1.296 Revision 1.297
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 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.296 2008/02/13 20:50:06 wolf31o2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.297 2008/02/15 07:43:45 vapier Exp $
4 4
5# @ECLASS: eutils.eclass 5# @ECLASS: eutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: many extra (but common) functions that are used in ebuilds 8# @BLURB: many extra (but common) functions that are used in ebuilds
1583 eerror "preserve_old_lib() must be called from pkg_preinst() only" 1583 eerror "preserve_old_lib() must be called from pkg_preinst() only"
1584 die "Invalid preserve_old_lib() usage" 1584 die "Invalid preserve_old_lib() usage"
1585 fi 1585 fi
1586 [[ -z $1 ]] && die "Usage: preserve_old_lib <library to preserve> [more libraries to preserve]" 1586 [[ -z $1 ]] && die "Usage: preserve_old_lib <library to preserve> [more libraries to preserve]"
1587 1587
1588 # let portage worry about it
1589 has preserve-libs ${FEATURES} && return 0
1590
1588 local lib dir 1591 local lib dir
1589 for lib in "$@" ; do 1592 for lib in "$@" ; do
1590 [[ -e ${ROOT}/${lib} ]] || continue 1593 [[ -e ${ROOT}/${lib} ]] || continue
1591 dir=${lib%/*} 1594 dir=${lib%/*}
1592 dodir ${dir} || die "dodir ${dir} failed" 1595 dodir ${dir} || die "dodir ${dir} failed"
1602preserve_old_lib_notify() { 1605preserve_old_lib_notify() {
1603 if [[ ${EBUILD_PHASE} != "postinst" ]] ; then 1606 if [[ ${EBUILD_PHASE} != "postinst" ]] ; then
1604 eerror "preserve_old_lib_notify() must be called from pkg_postinst() only" 1607 eerror "preserve_old_lib_notify() must be called from pkg_postinst() only"
1605 die "Invalid preserve_old_lib_notify() usage" 1608 die "Invalid preserve_old_lib_notify() usage"
1606 fi 1609 fi
1610
1611 # let portage worry about it
1612 has preserve-libs ${FEATURES} && return 0
1607 1613
1608 local lib notice=0 1614 local lib notice=0
1609 for lib in "$@" ; do 1615 for lib in "$@" ; do
1610 [[ -e ${ROOT}/${lib} ]] || continue 1616 [[ -e ${ROOT}/${lib} ]] || continue
1611 if [[ ${notice} -eq 0 ]] ; then 1617 if [[ ${notice} -eq 0 ]] ; then

Legend:
Removed from v.1.296  
changed lines
  Added in v.1.297

  ViewVC Help
Powered by ViewVC 1.1.20