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

Diff of /eclass/eutils.eclass

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

Revision 1.232 Revision 1.233
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.232 2006/03/22 21:18:05 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.233 2006/04/19 03:53:19 vapier 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.
437# shell: /bin/false 437# shell: /bin/false
438# homedir: /dev/null 438# homedir: /dev/null
439# groups: none 439# groups: none
440# extra: comment of 'added by portage for ${PN}' 440# extra: comment of 'added by portage for ${PN}'
441enewuser() { 441enewuser() {
442 case ${EBUILD_PHASE} in
443 unpack|compile|test|install)
444 eerror "'enewuser()' called from '${EBUILD_PHASE}()' which is not a pkg_* function."
445 eerror "Package fails at QA and at life. Please file a bug."
446 die "Bad package! enewuser is only for use in pkg_* functions!"
447 esac
448
442 # get the username 449 # get the username
443 local euser=$1; shift 450 local euser=$1; shift
444 if [[ -z ${euser} ]] ; then 451 if [[ -z ${euser} ]] ; then
445 eerror "No username specified !" 452 eerror "No username specified !"
446 die "Cannot call enewuser without a username" 453 die "Cannot call enewuser without a username"
632# Default values if you do not specify any: 639# Default values if you do not specify any:
633# groupname: REQUIRED ! 640# groupname: REQUIRED !
634# gid: next available (see groupadd(8)) 641# gid: next available (see groupadd(8))
635# extra: none 642# extra: none
636enewgroup() { 643enewgroup() {
644 case ${EBUILD_PHASE} in
645 unpack|compile|test|install)
646 eerror "'enewgroup()' called from '${EBUILD_PHASE}()' which is not a pkg_* function."
647 eerror "Package fails at QA and at life. Please file a bug."
648 die "Bad package! enewgroup is only for use in pkg_* functions!"
649 esac
650
637 # get the group 651 # get the group
638 local egroup="$1"; shift 652 local egroup="$1"; shift
639 if [ -z "${egroup}" ] 653 if [ -z "${egroup}" ]
640 then 654 then
641 eerror "No group specified !" 655 eerror "No group specified !"

Legend:
Removed from v.1.232  
changed lines
  Added in v.1.233

  ViewVC Help
Powered by ViewVC 1.1.20