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

Diff of /eclass/eutils.eclass

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

Revision 1.84 Revision 1.85
1# Copyright 1999-2004 Gentoo Technologies, Inc. 1# Copyright 1999-2004 Gentoo Technologies, Inc.
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.84 2004/02/29 07:17:27 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.85 2004/02/29 22:34:41 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.
560 560
561 # handle groups 561 # handle groups
562 local egroups="$1"; shift 562 local egroups="$1"; shift
563 if [ ! -z "${egroups}" ] 563 if [ ! -z "${egroups}" ]
564 then 564 then
565 local realgroup=
566 local oldifs="${IFS}" 565 local oldifs="${IFS}"
567 export IFS="," 566 export IFS=","
568 for g in ${egroups} 567 for g in ${egroups}
569 do 568 do
570 chgrp ${g} ${tmpfile} >& /dev/null 569 if [ -z "`getent group \"${g}\"`" ]
571 realgroup="`ls -l ${tmpfile} | awk '{print $4}'`"
572 if [ "${g}" != "${realgroup}" ]
573 then 570 then
574 eerror "You must add ${g} to the system first" 571 eerror "You must add group ${g} to the system first"
575 die "${g} is not a valid GID" 572 die "${g} is not a valid GID"
576 fi 573 fi
577 done 574 done
578 export IFS="${oldifs}" 575 export IFS="${oldifs}"
579 opts="${opts} -g ${egroups}" 576 opts="${opts} -g ${egroups}"

Legend:
Removed from v.1.84  
changed lines
  Added in v.1.85

  ViewVC Help
Powered by ViewVC 1.1.20