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

Diff of /eclass/eutils.eclass

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

Revision 1.197 Revision 1.200
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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.197 2005/09/18 17:33:44 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.200 2005/09/23 20:44:26 wolf31o2 Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass is for general purpose functions that most ebuilds 7# This eclass is for general purpose functions that most ebuilds
8# have to implement themselves. 8# have to implement themselves.
492 if [[ ! -e ${eshell} ]] ; then 492 if [[ ! -e ${eshell} ]] ; then
493 eerror "A shell was specified but it does not exist !" 493 eerror "A shell was specified but it does not exist !"
494 die "${eshell} does not exist" 494 die "${eshell} does not exist"
495 fi 495 fi
496 else 496 else
497 case ${USERLAND} in 497 for shell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null; do
498 Darwin) eshell="/usr/bin/false";; 498 [[ -x ${ROOT}${shell} ]] && break;
499 BSD) eshell="/usr/sbin/nologin";; 499 done
500 *) eshell="/bin/false";; 500
501 esac 501 if [[ ${shell} == "/dev/null" ]]; then
502 eerror "Unable to identify the shell to use"
503 die "Unable to identify the shell to use"
504 fi
505
506 eshell=${shell}
502 fi 507 fi
503 einfo " - Shell: ${eshell}" 508 einfo " - Shell: ${eshell}"
504 opts="${opts} -s ${eshell}" 509 opts="${opts} -s ${eshell}"
505 510
506 # handle homedir 511 # handle homedir
1129check_license() { 1134check_license() {
1130 local lic=$1 1135 local lic=$1
1131 if [ -z "${lic}" ] ; then 1136 if [ -z "${lic}" ] ; then
1132 lic="${PORTDIR}/licenses/${LICENSE}" 1137 lic="${PORTDIR}/licenses/${LICENSE}"
1133 else 1138 else
1134 if [ -e "${PORTDIR}/licenses/${src}" ] ; then 1139 if [ -e "${PORTDIR}/licenses/${lic}" ] ; then
1135 lic="${PORTDIR}/licenses/${src}" 1140 lic="${PORTDIR}/licenses/${lic}"
1136 elif [ -e "${PWD}/${src}" ] ; then 1141 elif [ -e "${PWD}/${lic}" ] ; then
1137 lic="${PWD}/${src}" 1142 lic="${PWD}/${lic}"
1138 elif [ -e "${src}" ] ; then 1143 elif [ -e "${lic}" ] ; then
1139 lic="${src}" 1144 lic="${lic}"
1140 fi
1141 fi 1145 fi
1146 fi
1142 [ ! -f "${lic}" ] && die "Could not find requested license ${src}" 1147 [ ! -f "${lic}" ] && die "Could not find requested license ${lic}"
1143 local l="`basename ${lic}`" 1148 local l="`basename ${lic}`"
1144 1149
1145 # here is where we check for the licenses the user already 1150 # here is where we check for the licenses the user already
1146 # accepted ... if we don't find a match, we make the user accept 1151 # accepted ... if we don't find a match, we make the user accept
1147 local shopts=$- 1152 local shopts=$-

Legend:
Removed from v.1.197  
changed lines
  Added in v.1.200

  ViewVC Help
Powered by ViewVC 1.1.20