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

Diff of /eclass/eutils.eclass

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

Revision 1.81 Revision 1.82
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.81 2004/02/24 03:53:26 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.82 2004/02/27 20:37:03 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.
517 local euid="$1"; shift 517 local euid="$1"; shift
518 if [ ! -z "${euid}" ] && [ "${euid}" != "-1" ] 518 if [ ! -z "${euid}" ] && [ "${euid}" != "-1" ]
519 then 519 then
520 if [ "${euid}" -gt 0 ] 520 if [ "${euid}" -gt 0 ]
521 then 521 then
522 chown ${euid} ${tmpfile} >& /dev/null
523 realuser="`ls -l ${tmpfile} | awk '{print $3}'`"
524 if [ "${realuser//[0-9]}" != "" ]
525 then
526 euid="uid is taken; using next available"
527 else
522 opts="${opts} -u ${euid}" 528 opts="${opts} -u ${euid}"
529 fi
523 else 530 else
524 eerror "Userid given but is not greater than 0 !" 531 eerror "Userid given but is not greater than 0 !"
525 die "${euid} is not a valid UID" 532 die "${euid} is not a valid UID"
526 fi 533 fi
527 else 534 else

Legend:
Removed from v.1.81  
changed lines
  Added in v.1.82

  ViewVC Help
Powered by ViewVC 1.1.20