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

Diff of /eclass/eutils.eclass

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

Revision 1.114 Revision 1.115
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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.114 2004/10/06 04:21:08 usata Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.115 2004/10/06 06:20:57 usata 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.
690 local defgroup="" exgroups="" 690 local defgroup="" exgroups=""
691 691
692 export IFS="," 692 export IFS=","
693 for g in ${egroups} 693 for g in ${egroups}
694 do 694 do
695 export IFS="${oldifs}"
695 if [ -z "`egetent group \"${g}\"`" ] 696 if [ -z "`egetent group \"${g}\"`" ]
696 then 697 then
697 eerror "You must add group ${g} to the system first" 698 eerror "You must add group ${g} to the system first"
698 die "${g} is not a valid GID" 699 die "${g} is not a valid GID"
699 fi 700 fi
701 then 702 then
702 defgroup="${g}" 703 defgroup="${g}"
703 else 704 else
704 exgroups="${exgroups},${g}" 705 exgroups="${exgroups},${g}"
705 fi 706 fi
707 export IFS=","
706 done 708 done
707 export IFS="${oldifs}" 709 export IFS="${oldifs}"
708 710
709 opts="${opts} -g ${defgroup}" 711 opts="${opts} -g ${defgroup}"
710 if [ ! -z "${exgroups}" ] 712 if [ ! -z "${exgroups}" ]
728 dscl . create /users/${euser} uid ${euid} 730 dscl . create /users/${euser} uid ${euid}
729 dscl . create /users/${euser} shell ${eshell} 731 dscl . create /users/${euser} shell ${eshell}
730 dscl . create /users/${euser} home ${ehome} 732 dscl . create /users/${euser} home ${ehome}
731 dscl . create /users/${euser} realname "added by portage for ${PN}" 733 dscl . create /users/${euser} realname "added by portage for ${PN}"
732 ### Add the user to the groups specified 734 ### Add the user to the groups specified
735 local oldifs="${IFS}"
736 export IFS=","
733 for g in ${egroups} 737 for g in ${egroups}
734 do 738 do
735 # $egroups is , delimited, not space
736 ewarn "This is code is wrong; someone on the OS X team should fix it"
737 dscl . merge /groups/${g} users ${euser} 739 dscl . merge /groups/${g} users ${euser}
738 done 740 done
741 export IFS="${oldifs}"
739 else 742 else
740 einfo "Extra options are not supported on macos yet" 743 einfo "Extra options are not supported on macos yet"
741 einfo "Please report the ebuild along with the info below" 744 einfo "Please report the ebuild along with the info below"
742 einfo "eextra: ${eextra}" 745 einfo "eextra: ${eextra}"
743 die "Required function missing" 746 die "Required function missing"

Legend:
Removed from v.1.114  
changed lines
  Added in v.1.115

  ViewVC Help
Powered by ViewVC 1.1.20