diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-02-27 20:39:19 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-02-27 20:39:19 +0000 |
commit | bf6c755fac0201563029b5e8c09cb45ee65f7da1 (patch) | |
tree | 14ee289dd8cc182bb133155404b22128fb63989e /eclass | |
parent | handle cases where requested uid is already taken #41657 (diff) | |
download | gentoo-2-bf6c755fac0201563029b5e8c09cb45ee65f7da1.tar.gz gentoo-2-bf6c755fac0201563029b5e8c09cb45ee65f7da1.tar.bz2 gentoo-2-bf6c755fac0201563029b5e8c09cb45ee65f7da1.zip |
handle cases where requested gid is already taken #41657
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/eutils.eclass | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 50ed27adb78a..48000a14e08d 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.82 2004/02/27 20:37:03 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.83 2004/02/27 20:39:19 vapier Exp $ # # Author: Martin Schlemmer <azarah@gentoo.org> # @@ -12,7 +12,7 @@ ECLASS=eutils INHERITED="$INHERITED $ECLASS" -newdepend "!bootstrap? ( sys-devel/patch )" +DEPEND="!bootstrap? ( sys-devel/patch )" DESCRIPTION="Based on the ${ECLASS} eclass" @@ -648,7 +648,14 @@ enewgroup() { then if [ "${egid}" -gt 0 ] then - opts="${opts} -g ${egid}" + chgrp ${egid} ${tmpfile} >& /dev/null + realuser="`ls -l ${tmpfile} | awk '{print $3}'`" + if [ "${realuser//[0-9]}" != "" ] + then + euid="gid is taken; using next available" + else + opts="${opts} -g ${egid}" + fi else eerror "Groupid given but is not greater than 0 !" die "${egid} is not a valid GID" |