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

Diff of /eclass/eutils.eclass

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

Revision 1.123 Revision 1.124
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.123 2004/11/11 04:10:40 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.124 2004/11/13 11:15:33 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.
577# Joe Jezak <josejx@gmail.com> and usata@gentoo.org 577# Joe Jezak <josejx@gmail.com> and usata@gentoo.org
578# FBSD stuff: Aaron Walker <ka0ttic@gentoo.org> 578# FBSD stuff: Aaron Walker <ka0ttic@gentoo.org>
579# 579#
580# egetent(database, key) 580# egetent(database, key)
581egetent() { 581egetent() {
582 if use ppc-macos ; then 582 if useq ppc-macos ; then
583 case "$2" in 583 case "$2" in
584 *[!0-9]*) # Non numeric 584 *[!0-9]*) # Non numeric
585 nidump $1 . | awk -F":" "{ if (\$1 ~ /^$2$/) {print \$0;exit;} }" 585 nidump $1 . | awk -F":" "{ if (\$1 ~ /^$2$/) {print \$0;exit;} }"
586 ;; 586 ;;
587 *) # Numeric 587 *) # Numeric
734 734
735 # handle extra and add the user 735 # handle extra and add the user
736 local eextra="$@" 736 local eextra="$@"
737 local oldsandbox="${SANDBOX_ON}" 737 local oldsandbox="${SANDBOX_ON}"
738 export SANDBOX_ON="0" 738 export SANDBOX_ON="0"
739 if use ppc-macos 739 if useq ppc-macos
740 then 740 then
741 ### Make the user 741 ### Make the user
742 if [ -z "${eextra}" ] 742 if [ -z "${eextra}" ]
743 then 743 then
744 dscl . create /users/${euser} uid ${euid} 744 dscl . create /users/${euser} uid ${euid}
827 then 827 then
828 if [ "${egid}" -gt 0 ] 828 if [ "${egid}" -gt 0 ]
829 then 829 then
830 if [ -z "`egetent group ${egid}`" ] 830 if [ -z "`egetent group ${egid}`" ]
831 then 831 then
832 if use ppc-macos ; then 832 if useq ppc-macos ; then
833 opts="${opts} ${egid}" 833 opts="${opts} ${egid}"
834 else 834 else
835 opts="${opts} -g ${egid}" 835 opts="${opts} -g ${egid}"
836 fi 836 fi
837 else 837 else
851 opts="${opts} ${eextra}" 851 opts="${opts} ${eextra}"
852 852
853 # add the group 853 # add the group
854 local oldsandbox="${SANDBOX_ON}" 854 local oldsandbox="${SANDBOX_ON}"
855 export SANDBOX_ON="0" 855 export SANDBOX_ON="0"
856 if use ppc-macos 856 if useq ppc-macos ; then
857 then
858 if [ ! -z "${eextra}" ]; 857 if [ ! -z "${eextra}" ];
859 then 858 then
860 einfo "Extra options are not supported on macos yet" 859 einfo "Extra options are not supported on macos yet"
861 einfo "Please report the ebuild along with the info below" 860 einfo "Please report the ebuild along with the info below"
862 einfo "eextra: ${eextra}" 861 einfo "eextra: ${eextra}"

Legend:
Removed from v.1.123  
changed lines
  Added in v.1.124

  ViewVC Help
Powered by ViewVC 1.1.20