diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/cvs.eclass | 19 | ||||
-rw-r--r-- | eclass/kde.org.eclass | 4 |
2 files changed, 16 insertions, 7 deletions
diff --git a/eclass/cvs.eclass b/eclass/cvs.eclass index 974a6f5ac133..9f8d322e71a1 100644 --- a/eclass/cvs.eclass +++ b/eclass/cvs.eclass @@ -1,7 +1,7 @@ # Copyright 1999-2000 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # Author Dan Armak <danarmak@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.28 2002/11/30 19:44:18 danarmak Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.29 2002/12/22 12:06:00 danarmak Exp $ # This eclass provides the generic cvs fetching functions. ECLASS=cvs @@ -209,7 +209,7 @@ DIR=$DIR" [ -n "$ECVS_BRANCH" ] && ECVS_CVS_OPTIONS="$ECVS_CVS_OPTIONS -r$ECVS_BRANCH" # Chowning the directory - if [ "${ECVS_RUNAS}" != "root" ]; then + if [ "${ECVS_RUNAS}" != "`whoami`" ]; then chown -R "$ECVS_RUNAS" "/$DIR" fi @@ -235,8 +235,12 @@ mypasswd = "${ECVS_PASS}" myauth = "${ECVS_AUTH}" mytimeout = 10 +if "${ECVS_RUNAS}" == "`whoami`": + mycommand = "${ECVS_CVS_COMMAND} update ${ECVS_CVS_OPTIONS}" +else: + mycommand = "su ${ECVS_RUNAS} -c \"${ECVS_CVS_COMMAND} update ${ECVS_CVS_OPTIONS}\"" + if myauth == "ext": - mycommand = "su ${ECVS_RUNAS} -c \"${ECVS_CVS_COMMAND} update ${ECVS_CVS_OPTIONS}\"" child = pexpect.spawn(mycommand) index = child.expect(['continue connecting','word:'], mytimeout) @@ -259,7 +263,8 @@ elif myauth == "pserver": child.expect(pexpect.EOF) # Logged in - checking out - os.system("su ${ECVS_RUNAS} -c \"${ECVS_CVS_COMMAND} update ${ECVS_CVS_OPTIONS}\" &> /dev/null") + os.system(mycommand) + EndOfFile ########################### End of inline-python ################################## else @@ -268,7 +273,11 @@ EndOfFile fi # log out and restore ownership - su $ECVS_RUNAS -c "cvs logout" &> /dev/null + if [ "$ECVS_RUNAS" == "`whoami`" ]; then + cvs logout &> /dev/null + else + su $ECVS_RUNAS -c "cvs logout" &> /dev/null + fi chown `whoami` "${T}/cvspass" } diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass index 2b6a25e10c71..3ffb62bcf4ed 100644 --- a/eclass/kde.org.eclass +++ b/eclass/kde.org.eclass @@ -1,7 +1,7 @@ # Copyright 1999-2000 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # Author Dan Armak <danarmak@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/eclass/kde.org.eclass,v 1.22 2002/12/08 15:34:51 danarmak Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde.org.eclass,v 1.23 2002/12/22 12:06:00 danarmak Exp $ # Contains the locations of ftp.kde.org packages and their mirrors ECLASS=kde.org @@ -10,7 +10,7 @@ INHERITED="$INHERITED $ECLASS" # kde 3.1 prereleases have tarball versions of 3.0.6 ff case "$PV" in 1*) SRC_PATH="stable/3.0.2/src/${P}.tar.bz2";; # backward compatibility for unmerging ebuilds - 2.2.2) SRC_PATH="2.2.2/src/${P}.tar.bz2" ;; + 2.2.2*) SRC_PATH="2.2.2/src/${P}.tar.bz2" ;; 3.1_alpha1) SRC_PATH="unstable/kde-3.1-alpha1/src/${P//3.1_alpha1/3.0.6}.tar.bz2" ;; 3.1_beta1) SRC_PATH="unstable/kde-3.1-beta1/src/${P//3.1_beta1/3.0.7}.tar.bz2" ;; 3.1_beta2) SRC_PATH="unstable/kde-3.1-beta2/src/${P//3.1_beta2/3.0.8}.tar.bz2" ;; |