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

Diff of /eclass/eutils.eclass

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

Revision 1.249 Revision 1.253
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.249 2006/09/11 03:28:58 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.253 2006/10/06 07:00:14 flameeyes 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!
501 for shell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null ; do 501 for shell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null ; do
502 [[ -x ${ROOT}${shell} ]] && break 502 [[ -x ${ROOT}${shell} ]] && break
503 done 503 done
504 504
505 if [[ ${shell} == "/dev/null" ]] ; then 505 if [[ ${shell} == "/dev/null" ]] ; then
506 eerror "Unable to identify the shell to use" 506 eerror "Unable to identify the shell to use, proceeding with userland default."
507 die "Unable to identify the shell to use" 507 case ${USERLAND} in
508 GNU) shell="/bin/false" ;;
509 BSD) shell="/sbin/nologin" ;;
510 Darwin) shell="/usr/sbin/nologin" ;;
511 *) die "Unable to identify the default shell for userland ${USERLAND}"
512 esac
508 fi 513 fi
509 514
510 eshell=${shell} 515 eshell=${shell}
511 fi 516 fi
512 einfo " - Shell: ${eshell}" 517 einfo " - Shell: ${eshell}"
817 games) 822 games)
818 case ${catmin} in 823 case ${catmin} in
819 action) type=ActionGame;; 824 action) type=ActionGame;;
820 arcade) type=ArcadeGame;; 825 arcade) type=ArcadeGame;;
821 board) type=BoardGame;; 826 board) type=BoardGame;;
822 kid) type=KidsGame;; 827 kids) type=KidsGame;;
823 emulation) type=Emulator;; 828 emulation) type=Emulator;;
824 puzzle) type=LogicGame;; 829 puzzle) type=LogicGame;;
825 rpg) type=RolePlaying;; 830 rpg) type=RolePlaying;;
826 roguelike) type=RolePlaying;; 831 roguelike) type=RolePlaying;;
827 simulation) type=Simulation;; 832 simulation) type=Simulation;;
1600 # if the USE file doesnt exist, assume the $PKG is either 1605 # if the USE file doesnt exist, assume the $PKG is either
1601 # injected or package.provided 1606 # injected or package.provided
1602 [[ ! -e ${USEFILE} ]] && die "Unable to determine what USE flags $PKG was built with" 1607 [[ ! -e ${USEFILE} ]] && die "Unable to determine what USE flags $PKG was built with"
1603 1608
1604 local IUSE_BUILT=$(<${IUSEFILE}) 1609 local IUSE_BUILT=$(<${IUSEFILE})
1610 # Don't check USE_EXPAND #147237
1611 local expand
1612 for expand in $(echo ${USE_EXPAND} | tr '[:upper:]' '[:lower:]') ; do
1613 if [[ $1 == ${expand}_* ]] ; then
1614 expand=""
1615 break
1616 fi
1617 done
1618 if [[ -n ${expand} ]] ; then
1605 has $1 ${IUSE_BUILT} || die "$PKG does not actually support the $1 USE flag!" 1619 has $1 ${IUSE_BUILT} || die "$PKG does not actually support the $1 USE flag!"
1620 fi
1606 1621
1607 local USE_BUILT=$(<${USEFILE}) 1622 local USE_BUILT=$(<${USEFILE})
1608 while [[ $# -gt 0 ]] ; do 1623 while [[ $# -gt 0 ]] ; do
1609 if [[ ${opt} = "-o" ]] ; then 1624 if [[ ${opt} = "-o" ]] ; then
1610 has $1 ${USE_BUILT} && return 0 1625 has $1 ${USE_BUILT} && return 0

Legend:
Removed from v.1.249  
changed lines
  Added in v.1.253

  ViewVC Help
Powered by ViewVC 1.1.20