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

Diff of /eclass/eutils.eclass

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

Revision 1.220 Revision 1.223
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.220 2005/12/13 14:08:29 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.223 2006/02/15 23:40:16 flameeyes 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.
383 tmp=${topdir}/tmp.${RANDOM}.${RANDOM}.${RANDOM} 383 tmp=${topdir}/tmp.${RANDOM}.${RANDOM}.${RANDOM}
384 done 384 done
385 ${exe} "${tmp}" || ${exe} -p "${tmp}" 385 ${exe} "${tmp}" || ${exe} -p "${tmp}"
386 echo "${tmp}" 386 echo "${tmp}"
387 else 387 else
388 [[ ${exe} == "touch" ]] \ 388 if [[ ${exe} == "touch" ]] ; then
389 [[ ${USERLAND} == "GNU" ]] \
389 && exe="-p" \ 390 && exe="-p" \
391 || exe="-t"
392 else
393 [[ ${USERLAND} == "GNU" ]] \
394 && exe="-d" \
390 || exe="-d" 395 || exe="-dt"
391 mktemp ${exe} "${topdir}" 396 fi
397 TMPDIR="${topdir}" mktemp ${exe} tmp
392 fi 398 fi
393} 399}
394 400
395# Small wrapper for getent (Linux), nidump (Mac OS X), 401# Small wrapper for getent (Linux), nidump (Mac OS X),
396# and pw (FreeBSD) used in enewuser()/enewgroup() 402# and pw (FreeBSD) used in enewuser()/enewgroup()
484 einfo " - Userid: ${euid}" 490 einfo " - Userid: ${euid}"
485 491
486 # handle shell 492 # handle shell
487 local eshell=$1; shift 493 local eshell=$1; shift
488 if [[ ! -z ${eshell} ]] && [[ ${eshell} != "-1" ]] ; then 494 if [[ ! -z ${eshell} ]] && [[ ${eshell} != "-1" ]] ; then
489 if [[ ! -e ${eshell} ]] ; then 495 if [[ ! -e ${ROOT}${eshell} ]] ; then
490 eerror "A shell was specified but it does not exist !" 496 eerror "A shell was specified but it does not exist !"
491 die "${eshell} does not exist" 497 die "${eshell} does not exist in ${ROOT}"
498 fi
499 if [[ ${eshell} == */false || ${eshell} == */nologin ]] ; then
500 eerror "Do not specify ${eshell} yourself, use -1"
501 die "Pass '-1' as the shell parameter"
492 fi 502 fi
493 else 503 else
494 for shell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null ; do 504 for shell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null ; do
495 [[ -x ${ROOT}${shell} ]] && break 505 [[ -x ${ROOT}${shell} ]] && break
496 done 506 done
1407 echo 1417 echo
1408 einfo "If you are having trouble with the detection" 1418 einfo "If you are having trouble with the detection"
1409 einfo "of your CD, it is possible that you do not have" 1419 einfo "of your CD, it is possible that you do not have"
1410 einfo "Joliet support enabled in your kernel. Please" 1420 einfo "Joliet support enabled in your kernel. Please"
1411 einfo "check that CONFIG_JOLIET is enabled in your kernel." 1421 einfo "check that CONFIG_JOLIET is enabled in your kernel."
1412 read 1422 read || die "something is screwed with your system"
1413 done 1423 done
1414} 1424}
1415 1425
1416# Make sure that LINGUAS only contains languages that 1426# Make sure that LINGUAS only contains languages that
1417# a package can support 1427# a package can support

Legend:
Removed from v.1.220  
changed lines
  Added in v.1.223

  ViewVC Help
Powered by ViewVC 1.1.20