* [gentoo-commits] gentoo-x86 commit in eclass: cvs.eclass
@ 2008-03-06 0:54 Bo Oersted Andresen (zlin)
0 siblings, 0 replies; 10+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-03-06 0:54 UTC (permalink / raw
To: gentoo-commits
zlin 08/03/06 00:54:08
Modified: cvs.eclass
Log:
Document for use with eclass-manpages (bug #210635).
Revision Changes Path
1.69 eclass/cvs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cvs.eclass?rev=1.69&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cvs.eclass?rev=1.69&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cvs.eclass?r1=1.68&r2=1.69
Index: cvs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- cvs.eclass 11 Dec 2006 00:16:28 -0000 1.68
+++ cvs.eclass 6 Mar 2008 00:54:07 -0000 1.69
@@ -1,17 +1,19 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.68 2006/12/11 00:16:28 vapier Exp $
-#
-# Maintainer: vapier@gentoo.org (and anyone who wants to help)
+# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.69 2008/03/06 00:54:07 zlin Exp $
-inherit eutils
+# @ECLASS: cvs.eclass
+# @MAINTAINER:
+# vapier@gentoo.org (and anyone who wants to help)
+# @BLURB: This eclass provides generic cvs fetching functions
+# @DESCRIPTION:
+# This eclass provides the generic cvs fetching functions. To use this from an
+# ebuild, set the ECLASS VARIABLES as specified below in your ebuild before
+# inheriting. Then either leave the default src_unpack or extend over
+# cvs_src_unpack. If you find that you need to call the cvs_* functions
+# directly, I'd be interested to hear about it.
-# This eclass provides the generic cvs fetching functions. To use
-# this from an ebuild, set the `ebuild-configurable settings' as
-# specified below in your ebuild before inheriting. Then either leave
-# the default src_unpack or extend over cvs_src_unpack. If you find
-# that you need to call the cvs_* functions directly, I'd be
-# interested to hear about it.
+inherit eutils
# TODO:
@@ -21,40 +23,55 @@
# anyone actually need to use it with anything other than SSH?)
-
# Users shouldn't change these settings! The ebuild/eclass inheriting
# this eclass will take care of that. If you want to set the global
# KDE cvs ebuilds' settings, see the comments in kde-source.eclass.
-# --- begin ebuild-configurable settings
-
-# ECVS_CVS_COMMAND -- CVS command to run
+# @ECLASS-VARIABLE: ECVS_CVS_COMMAND
+# @DESCRIPTION:
+# CVS command to run
#
# You can set, for example, "cvs -t" for extensive debug information
# on the cvs connection. The default of "cvs -q -f -z4" means to be
# quiet, to disregard the ~/.cvsrc config file and to use maximum
# compression.
+# @ECLASS-VARIABLE: ECVS_CVS_COMPRESS
+# @DESCRIPTION:
+# Set the compression level.
[[ -z ${ECVS_CVS_COMPRESS} ]] && ECVS_CVS_COMPRESS="-z1"
-[[ -z ${ECVS_CVS_OPTIONS} ]] && ECVS_CVS_OPTIONS="-q -f"
-[[ -z ${ECVS_CVS_COMMAND} ]] && ECVS_CVS_COMMAND="cvs ${ECVS_CVS_OPTIONS} ${ECVS_CVS_COMPRESS}"
+# @ECLASS-VARIABLE: ECVS_CVS_OPTIONS
+# @DESCRIPTION:
+# Additional options to the cvs commands.
+[[ -z ${ECVS_CVS_OPTIONS} ]] && ECVS_CVS_OPTIONS="-q -f"
-# ECVS_UP_OPTS, ECVS_CO_OPTS -- CVS options given after the cvs
-# command (update or checkout).
-#
-# Don't remove -dP from update or things won't work.
+# @ECLASS-VARIABLE: ECVS_CVS_COMMAND
+# @DESCRIPTION:
+# The cvs command.
+[[ -z ${ECVS_CVS_COMMAND} ]] && ECVS_CVS_COMMAND="cvs ${ECVS_CVS_OPTIONS} ${ECVS_CVS_COMPRESS}"
+# @ECLASS-VARIABLE: ECVS_UP_OPTS
+# @DESCRIPTION:
+# CVS options given after the cvs update command. Don't remove "-dP" or things
+# won't work.
[ -z "$ECVS_UP_OPTS" ] && ECVS_UP_OPTS="-dP"
-[ -z "$ECVS_CO_OPTS" ] && ECVS_CO_OPTS=""
-
-# ECVS_LOCAL -- If this is set, the CVS module will be fetched
-# non-recursively. Refer to the information in the CVS man page
-# regarding the -l command option (not the -l global option).
+# @ECLASS-VARIABLE: ECVS_CO_OPTS
+# @DESCRIPTION:
+# CVS options given after the cvs checkout command.
+[ -z "$ECVS_CO_OPTS" ] && ECVS_CO_OPTS=""
-# ECVS_LOCALNAME -- local name of checkout directory
+# @ECLASS-VARIABLE: ECVS_LOCAL
+# @DESCRIPTION:
+# If this is set, the CVS module will be fetched non-recursively.
+# Refer to the information in the CVS man page regarding the -l
+# command option (not the -l global option).
+
+# @ECLASS-VARIABLE: ECVS_LOCLANAME
+# @DESCRIPTION:
+# Local name of checkout directory
#
# This is useful if the module on the server is called something
# common like 'driver' or is nested deep in a tree, and you don't like
@@ -64,13 +81,14 @@
# some such, things will break because the ebuild won't expect it and
# have e.g. a wrong $S setting.
-
-# ECVS_TOP_DIR -- The directory under which CVS modules are checked
-# out.
-
+# @ECLASS-VARIABLE: ECVS_TOP_DIR
+# @DESCRIPTION:
+# The directory under which CVS modules are checked out.
[ -z "$ECVS_TOP_DIR" ] && ECVS_TOP_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/cvs-src"
-# ECVS_SERVER -- CVS path
+# @ECLASS-VARIABLE: ECVS_SERVER
+# @DESCRIPTION:
+# CVS path
#
# The format is "server:/dir", e.g. "anoncvs.kde.org:/home/kde".
# Remove the other parts of the full CVSROOT, which might look like
@@ -79,27 +97,29 @@
#
# Set this to "offline" to disable fetching (i.e. to assume the module
# is already checked out in ECVS_TOP_DIR).
-
[ -z "$ECVS_SERVER" ] && ECVS_SERVER="offline"
-
-# ECVS_MODULE -- the name of the CVS module to be fetched
+# @ECLASS-VARIABLE: ECVS_MODULE
+# @DESCRIPTION:
+# The name of the CVS module to be fetched
#
# This must be set when cvs_src_unpack is called. This can include
# several directory levels, i.e. "foo/bar/baz"
#[ -z "$ECVS_MODULE" ] && die "$ECLASS: error: ECVS_MODULE not set, cannot continue"
-
-# ECVS_BRANCH -- the name of the branch/tag to use
-
+# @ECLASS-VARIABLE: ECVS_BRANCH
+# @DESCRIPTION:
+# The name of the branch/tag to use
+#
# The default is "HEAD". The following default _will_ reset your
# branch checkout to head if used.
#[ -z "$ECVS_BRANCH" ] && ECVS_BRANCH="HEAD"
-
-# ECVS_AUTH -- authentication method to use
+# @ECLASS-VARIABLE: ECVS_AUTH
+# @DESCRIPTION:
+# Authentication method to use
#
# Possible values are "pserver" and "ext". If `ext' authentication is
# used, the remote shell to use can be specified in CVS_RSH (SSH is
@@ -114,15 +134,18 @@
# ( from gnustep-apps/textedit )
[ -z "$ECVS_AUTH" ] && ECVS_AUTH="pserver"
-# ECVS_USER -- Username to use for authentication on the remote server
+# @ECLASS-VARIABLE: ECVS_USER
+# @DESCRIPTION:
+# Username to use for authentication on the remote server.
[ -z "$ECVS_USER" ] && ECVS_USER="anonymous"
-# ECVS_PASS -- Password to use for authentication on the remote server
+# @ECLASS-VARIABLE: ECVS_PASS
+# @DESCRIPTION:
+# Password to use for authentication on the remote server
[ -z "$ECVS_PASS" ] && ECVS_PASS=""
-
-# ECVS_SSH_HOST_KEY
-#
+# @ECLASS-VARIABLE: ECVS_SSH_HOST_KEY
+# @DESCRIPTION:
# If SSH is used for `ext' authentication, use this variable to
# specify the host key of the remote server. The format of the value
# should be the same format that is used for the SSH known hosts file.
@@ -130,26 +153,22 @@
# WARNING: If a SSH host key is not specified using this variable, the
# remote host key will not be verified.
-
-# ECVS_CLEAN -- Set this to get a clean copy when updating (passes the
+# @ECLASS-VARIABLE: ECVS_CLEAN
+# @DESCRIPTION:
+# Set this to get a clean copy when updating (passes the
# -C option to cvs update)
-
-# ECVS_RUNAS
-#
+# @ECLASS-VARIABLE: ECVS_RUNAS
+# @DESCRIPTION:
# Specifies an alternate (non-root) user to use to run cvs. Currently
# b0rked and wouldn't work with portage userpriv anyway without
# special magic.
# [ -z "$ECVS_RUNAS" ] && ECVS_RUNAS="`whoami`"
-
# ECVS_SUBDIR -- deprecated, do not use
[ -n "$ECVS_SUBDIR" ] && die "ERROR: deprecated ECVS_SUBDIR defined. Please fix this ebuild."
-
-# --- end ebuild-configurable settings ---
-
# add cvs to deps
# ssh is used for ext auth
# sudo is used to run as a specified user
@@ -462,7 +481,9 @@
}
-
+# @FUNCTION: cvs_src_unpack
+# @DESCRIPTION:
+# The cvs src_unpack function, which will be exported
cvs_src_unpack() {
debug-print-function $FUNCNAME $*
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: cvs.eclass
@ 2008-04-27 7:00 Ulrich Mueller (ulm)
0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Mueller (ulm) @ 2008-04-27 7:00 UTC (permalink / raw
To: gentoo-commits
ulm 08/04/27 07:00:40
Modified: cvs.eclass
Log:
Fix a typo.
Revision Changes Path
1.70 eclass/cvs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cvs.eclass?rev=1.70&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cvs.eclass?rev=1.70&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/cvs.eclass?r1=1.69&r2=1.70
Index: cvs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- cvs.eclass 6 Mar 2008 00:54:07 -0000 1.69
+++ cvs.eclass 27 Apr 2008 07:00:40 -0000 1.70
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.69 2008/03/06 00:54:07 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.70 2008/04/27 07:00:40 ulm Exp $
# @ECLASS: cvs.eclass
# @MAINTAINER:
@@ -69,7 +69,7 @@
# Refer to the information in the CVS man page regarding the -l
# command option (not the -l global option).
-# @ECLASS-VARIABLE: ECVS_LOCLANAME
+# @ECLASS-VARIABLE: ECVS_LOCALNAME
# @DESCRIPTION:
# Local name of checkout directory
#
@@ -159,7 +159,7 @@
# -C option to cvs update)
# @ECLASS-VARIABLE: ECVS_RUNAS
-# @DESCRIPTION:
+# @DESCRIPTION:
# Specifies an alternate (non-root) user to use to run cvs. Currently
# b0rked and wouldn't work with portage userpriv anyway without
# special magic.
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: cvs.eclass
@ 2010-08-21 18:21 Mike Frysinger (vapier)
0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger (vapier) @ 2010-08-21 18:21 UTC (permalink / raw
To: gentoo-commits
vapier 10/08/21 18:21:06
Modified: cvs.eclass
Log:
support ESCM_OFFLINE #307743 by Martin Väth
Revision Changes Path
1.72 eclass/cvs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.72&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.72&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?r1=1.71&r2=1.72
Index: cvs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- cvs.eclass 19 Jun 2010 00:35:11 -0000 1.71
+++ cvs.eclass 21 Aug 2010 18:21:06 -0000 1.72
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.71 2010/06/19 00:35:11 abcd Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.72 2010/08/21 18:21:06 vapier Exp $
# @ECLASS: cvs.eclass
# @MAINTAINER:
@@ -62,6 +62,12 @@
# CVS options given after the cvs checkout command.
[ -z "$ECVS_CO_OPTS" ] && ECVS_CO_OPTS=""
+# @ECLASS-VARIABLE: ECVS_OFFLINE
+# @DESCRIPTION:
+# Set this variable to a non-empty value to disable the automatic updating of
+# a CVS source tree. This is intended to be set outside the cvs source
+# tree by users.
+: ${ECVS_OFFLINE:=${ESCM_OFFLINE}}
# @ECLASS-VARIABLE: ECVS_LOCAL
# @DESCRIPTION:
@@ -511,7 +517,7 @@
local sanitized_pn=$(echo "${PN}" | LC_ALL=C sed -e 's:[^A-Za-z0-9_]:_:g')
local offline_pkg_var="ECVS_OFFLINE_${sanitized_pn}"
- if [ "${!offline_pkg_var}" == "1" -o "$ECVS_OFFLINE" == "1" -o "$ECVS_SERVER" == "offline" ]; then
+ if [[ -n ${!offline_pkg_var}${ECVS_OFFLINE} ]] || [[ "$ECVS_SERVER" == "offline" ]] ; then
# We're not required to fetch anything; the module already
# exists and shouldn't be updated.
if [ -d "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}" ]; then
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: cvs.eclass
@ 2010-08-22 20:50 Mike Frysinger (vapier)
0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger (vapier) @ 2010-08-22 20:50 UTC (permalink / raw
To: gentoo-commits
vapier 10/08/22 20:50:52
Modified: cvs.eclass
Log:
add E{CVS,SCM}_VERSION support #333773 by Michał Górny
Revision Changes Path
1.74 eclass/cvs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.74&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.74&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?r1=1.73&r2=1.74
Index: cvs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- cvs.eclass 21 Aug 2010 19:36:45 -0000 1.73
+++ cvs.eclass 22 Aug 2010 20:50:52 -0000 1.74
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.73 2010/08/21 19:36:45 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.74 2010/08/22 20:50:52 vapier Exp $
# @ECLASS: cvs.eclass
# @MAINTAINER:
@@ -548,6 +548,10 @@
cp -Rf "$ECVS_TOP_DIR/$ECVS_LOCALNAME" "$WORKDIR/$ECVS_LOCALNAME/.."
fi
+ # Not exactly perfect, but should be pretty close #333773
+ export ECVS_VERSION=$(find "$ECVS_TOP_DIR/$ECVS_LOCALNAME/" -ipath '*/CVS/Entries' -exec cat {} + | sort | sha1sum | awk '{print $1}')
+ export ESCM_VERSION=${ECVS_VERSION}
+
# If the directory is empty, remove it; empty directories cannot
# exist in cvs. This happens when, for example, kde-source
# requests module/doc/subdir which doesn't exist. Still create
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: cvs.eclass
@ 2010-08-24 21:00 Mike Frysinger (vapier)
0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger (vapier) @ 2010-08-24 21:00 UTC (permalink / raw
To: gentoo-commits
vapier 10/08/24 21:00:15
Modified: cvs.eclass
Log:
make sure the sort is in a C locale #333773 by Michał Górny
Revision Changes Path
1.75 eclass/cvs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.75&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.75&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?r1=1.74&r2=1.75
Index: cvs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- cvs.eclass 22 Aug 2010 20:50:52 -0000 1.74
+++ cvs.eclass 24 Aug 2010 21:00:15 -0000 1.75
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.74 2010/08/22 20:50:52 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.75 2010/08/24 21:00:15 vapier Exp $
# @ECLASS: cvs.eclass
# @MAINTAINER:
@@ -549,7 +549,7 @@
fi
# Not exactly perfect, but should be pretty close #333773
- export ECVS_VERSION=$(find "$ECVS_TOP_DIR/$ECVS_LOCALNAME/" -ipath '*/CVS/Entries' -exec cat {} + | sort | sha1sum | awk '{print $1}')
+ export ECVS_VERSION=$(find "$ECVS_TOP_DIR/$ECVS_LOCALNAME/" -ipath '*/CVS/Entries' -exec cat {} + | LC_ALL=C sort | sha1sum | awk '{print $1}')
export ESCM_VERSION=${ECVS_VERSION}
# If the directory is empty, remove it; empty directories cannot
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: cvs.eclass
@ 2010-08-25 19:57 Mike Frysinger (vapier)
0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger (vapier) @ 2010-08-25 19:57 UTC (permalink / raw
To: gentoo-commits
vapier 10/08/25 19:57:53
Modified: cvs.eclass
Log:
fix order of ECVS_CVS_COMMAND and its default options #334241 by Michał Górny
Revision Changes Path
1.76 eclass/cvs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.76&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.76&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?r1=1.75&r2=1.76
Index: cvs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- cvs.eclass 24 Aug 2010 21:00:15 -0000 1.75
+++ cvs.eclass 25 Aug 2010 19:57:53 -0000 1.76
@@ -1,6 +1,6 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.75 2010/08/24 21:00:15 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.76 2010/08/25 19:57:53 vapier Exp $
# @ECLASS: cvs.eclass
# @MAINTAINER:
@@ -27,6 +27,18 @@
# this eclass will take care of that. If you want to set the global
# KDE cvs ebuilds' settings, see the comments in kde-source.eclass.
+# @ECLASS-VARIABLE: ECVS_CVS_COMPRESS
+# @DESCRIPTION:
+# Set the default compression level. Has no effect when ECVS_CVS_COMMAND
+# is defined by ebuild/user.
+: ${ECVS_CVS_COMPRESS:=-z1}
+
+# @ECLASS-VARIABLE: ECVS_CVS_OPTIONS
+# @DESCRIPTION:
+# Additional options to the cvs commands. Has no effect when ECVS_CVS_COMMAND
+# is defined by ebuild/user.
+: ${ECVS_CVS_OPTIONS:=-q -f}
+
# @ECLASS-VARIABLE: ECVS_CVS_COMMAND
# @DESCRIPTION:
# CVS command to run
@@ -35,28 +47,18 @@
# on the cvs connection. The default of "cvs -q -f -z4" means to be
# quiet, to disregard the ~/.cvsrc config file and to use maximum
# compression.
-[[ -z ${ECVS_CVS_COMMAND} ]] && ECVS_CVS_COMMAND="cvs ${ECVS_CVS_OPTIONS} ${ECVS_CVS_COMPRESS}"
-
-# @ECLASS-VARIABLE: ECVS_CVS_COMPRESS
-# @DESCRIPTION:
-# Set the compression level.
-[[ -z ${ECVS_CVS_COMPRESS} ]] && ECVS_CVS_COMPRESS="-z1"
-
-# @ECLASS-VARIABLE: ECVS_CVS_OPTIONS
-# @DESCRIPTION:
-# Additional options to the cvs commands.
-[[ -z ${ECVS_CVS_OPTIONS} ]] && ECVS_CVS_OPTIONS="-q -f"
+: ${ECVS_CVS_COMMAND:=cvs ${ECVS_CVS_OPTIONS} ${ECVS_CVS_COMPRESS}}
# @ECLASS-VARIABLE: ECVS_UP_OPTS
# @DESCRIPTION:
# CVS options given after the cvs update command. Don't remove "-dP" or things
# won't work.
-[ -z "$ECVS_UP_OPTS" ] && ECVS_UP_OPTS="-dP"
+: ${ECVS_UP_OPTS:=-dP}
# @ECLASS-VARIABLE: ECVS_CO_OPTS
+# @DEFAULT_UNSET
# @DESCRIPTION:
# CVS options given after the cvs checkout command.
-[ -z "$ECVS_CO_OPTS" ] && ECVS_CO_OPTS=""
# @ECLASS-VARIABLE: ECVS_OFFLINE
# @DESCRIPTION:
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: cvs.eclass
@ 2013-01-22 7:02 Mike Frysinger (vapier)
0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger (vapier) @ 2013-01-22 7:02 UTC (permalink / raw
To: gentoo-commits
vapier 13/01/22 07:02:06
Modified: cvs.eclass
Log:
add multiple inclusion protection
Revision Changes Path
1.78 eclass/cvs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.78&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.78&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?r1=1.77&r2=1.78
Index: cvs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- cvs.eclass 9 Sep 2012 07:03:28 -0000 1.77
+++ cvs.eclass 22 Jan 2013 07:02:06 -0000 1.78
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.77 2012/09/09 07:03:28 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.78 2013/01/22 07:02:06 vapier Exp $
# @ECLASS: cvs.eclass
# @MAINTAINER:
@@ -13,6 +13,9 @@
# cvs_src_unpack. If you find that you need to call the cvs_* functions
# directly, I'd be interested to hear about it.
+if [[ ${___ECLASS_ONCE_CVS} != "recur -_+^+_- spank" ]] ; then
+___ECLASS_ONCE_CVS="recur -_+^+_- spank"
+
inherit eutils
# TODO:
@@ -578,3 +581,5 @@
}
EXPORT_FUNCTIONS src_unpack
+
+fi
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: cvs.eclass
@ 2013-01-22 7:25 Mike Frysinger (vapier)
0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger (vapier) @ 2013-01-22 7:25 UTC (permalink / raw
To: gentoo-commits
vapier 13/01/22 07:25:59
Modified: cvs.eclass
Log:
convert to bash style through out
Revision Changes Path
1.79 eclass/cvs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.79&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.79&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?r1=1.78&r2=1.79
Index: cvs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- cvs.eclass 22 Jan 2013 07:02:06 -0000 1.78
+++ cvs.eclass 22 Jan 2013 07:25:59 -0000 1.79
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.78 2013/01/22 07:02:06 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.79 2013/01/22 07:25:59 vapier Exp $
# @ECLASS: cvs.eclass
# @MAINTAINER:
@@ -93,7 +93,7 @@
# @ECLASS-VARIABLE: ECVS_TOP_DIR
# @DESCRIPTION:
# The directory under which CVS modules are checked out.
-[ -z "$ECVS_TOP_DIR" ] && ECVS_TOP_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/cvs-src"
+: ${ECVS_TOP_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/cvs-src"}
# @ECLASS-VARIABLE: ECVS_SERVER
# @DESCRIPTION:
@@ -106,7 +106,7 @@
#
# Set this to "offline" to disable fetching (i.e. to assume the module
# is already checked out in ECVS_TOP_DIR).
-[ -z "$ECVS_SERVER" ] && ECVS_SERVER="offline"
+: ${ECVS_SERVER:="offline"}
# @ECLASS-VARIABLE: ECVS_MODULE
# @REQUIRED
@@ -115,8 +115,7 @@
#
# This must be set when cvs_src_unpack is called. This can include
# several directory levels, i.e. "foo/bar/baz"
-
-#[ -z "$ECVS_MODULE" ] && die "$ECLASS: error: ECVS_MODULE not set, cannot continue"
+#[[ -z ${ECVS_MODULE} ]] && die "$ECLASS: error: ECVS_MODULE not set, cannot continue"
# @ECLASS-VARIABLE: ECVS_BRANCH
# @DEFAULT_UNSET
@@ -125,8 +124,7 @@
#
# The default is "HEAD". The following default _will_ reset your
# branch checkout to head if used.
-
-#[ -z "$ECVS_BRANCH" ] && ECVS_BRANCH="HEAD"
+#: ${ECVS_BRANCH:="HEAD"}
# @ECLASS-VARIABLE: ECVS_AUTH
# @DESCRIPTION:
@@ -143,17 +141,17 @@
# e.g.
# "cvs -danoncvs@savannah.gnu.org:/cvsroot/backbone co System"
# ( from gnustep-apps/textedit )
-[ -z "$ECVS_AUTH" ] && ECVS_AUTH="pserver"
+: ${ECVS_AUTH:="pserver"}
# @ECLASS-VARIABLE: ECVS_USER
# @DESCRIPTION:
# Username to use for authentication on the remote server.
-[ -z "$ECVS_USER" ] && ECVS_USER="anonymous"
+: ${ECVS_USER:="anonymous"}
# @ECLASS-VARIABLE: ECVS_PASS
+# @DEFAULT_UNSET
# @DESCRIPTION:
# Password to use for authentication on the remote server
-[ -z "$ECVS_PASS" ] && ECVS_PASS=""
# @ECLASS-VARIABLE: ECVS_SSH_HOST_KEY
# @DEFAULT_UNSET
@@ -178,25 +176,25 @@
# b0rked and wouldn't work with portage userpriv anyway without
# special magic.
-# [ -z "$ECVS_RUNAS" ] && ECVS_RUNAS="`whoami`"
+# : ${ECVS_RUNAS:=$(whoami)}
# ECVS_SUBDIR -- deprecated, do not use
-[ -n "$ECVS_SUBDIR" ] && die "ERROR: deprecated ECVS_SUBDIR defined. Please fix this ebuild."
+[[ -n ${ECVS_SUBDIR} ]] && die "ERROR: deprecated ECVS_SUBDIR defined. Please fix this ebuild."
# add cvs to deps
# ssh is used for ext auth
# sudo is used to run as a specified user
DEPEND="dev-vcs/cvs"
-[ -n "$ECVS_RUNAS" ] && DEPEND="$DEPEND app-admin/sudo"
+[[ -n ${ECVS_RUNAS} ]] && DEPEND+=" app-admin/sudo"
-if [ "$ECVS_AUTH" == "ext" ]; then
+if [[ ${ECVS_AUTH} == "ext" ]] ; then
#default to ssh
- [ -z "$CVS_RSH" ] && export CVS_RSH="ssh"
- if [ "$CVS_RSH" != "ssh" ]; then
+ [[ -z ${CVS_RSH} ]] && export CVS_RSH="ssh"
+ if [[ ${CVS_RSH} != "ssh" ]] ; then
die "Support for ext auth with clients other than ssh has not been implemented yet"
fi
- DEPEND="${DEPEND} net-misc/openssh"
+ DEPEND+=" net-misc/openssh"
fi
# called from cvs_src_unpack
@@ -205,11 +203,11 @@
# Make these options local variables so that the global values are
# not affected by modifications in this function.
- local ECVS_COMMAND="${ECVS_COMMAND}"
- local ECVS_UP_OPTS="${ECVS_UP_OPTS}"
- local ECVS_CO_OPTS="${ECVS_CO_OPTS}"
+ local ECVS_COMMAND=${ECVS_COMMAND}
+ local ECVS_UP_OPTS=${ECVS_UP_OPTS}
+ local ECVS_CO_OPTS=${ECVS_CO_OPTS}
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
# Update variables that are modified by ebuild parameters, which
# should be effective every time cvs_fetch is called, and not just
@@ -217,9 +215,9 @@
# Handle parameter for local (non-recursive) fetching
- if [ -n "$ECVS_LOCAL" ]; then
- ECVS_UP_OPTS="$ECVS_UP_OPTS -l"
- ECVS_CO_OPTS="$ECVS_CO_OPTS -l"
+ if [[ -n ${ECVS_LOCAL} ]] ; then
+ ECVS_UP_OPTS+=" -l"
+ ECVS_CO_OPTS+=" -l"
fi
# Handle ECVS_BRANCH option
@@ -227,38 +225,35 @@
# Because CVS auto-switches branches, we just have to pass the
# correct -rBRANCH option when updating.
- if [ -n "$ECVS_BRANCH" ]; then
- ECVS_UP_OPTS="$ECVS_UP_OPTS -r$ECVS_BRANCH"
- ECVS_CO_OPTS="$ECVS_CO_OPTS -r$ECVS_BRANCH"
+ if [[ -n ${ECVS_BRANCH} ]] ; then
+ ECVS_UP_OPTS+=" -r${ECVS_BRANCH}"
+ ECVS_CO_OPTS+=" -r${ECVS_BRANCH}"
fi
# Handle ECVS_LOCALNAME, which specifies the local directory name
# to use. Note that the -d command option is not equivalent to
# the global -d option.
- if [ "$ECVS_LOCALNAME" != "$ECVS_MODULE" ]; then
- ECVS_CO_OPTS="$ECVS_CO_OPTS -d $ECVS_LOCALNAME"
+ if [[ ${ECVS_LOCALNAME} != "${ECVS_MODULE}" ]] ; then
+ ECVS_CO_OPTS+=" -d ${ECVS_LOCALNAME}"
fi
-
- if [ -n "$ECVS_CLEAN" ]; then
- ECVS_UP_OPTS="$ECVS_UP_OPTS -C"
+ if [[ -n ${ECVS_CLEAN} ]] ; then
+ ECVS_UP_OPTS+=" -C"
fi
-
# It would be easiest to always be in "run-as mode", logic-wise,
# if sudo didn't ask for a password even when sudo'ing to `whoami`.
- if [ -z "$ECVS_RUNAS" ]; then
+ if [[ -z ${ECVS_RUNAS} ]] ; then
run=""
else
- run="sudo -u $ECVS_RUNAS"
+ run="sudo -u ${ECVS_RUNAS}"
fi
# Create the top dir if needed
- if [ ! -d "$ECVS_TOP_DIR" ]; then
-
+ if [[ ! -d ${ECVS_TOP_DIR} ]] ; then
# Note that the addwrite statements in this block are only
# there to allow creating ECVS_TOP_DIR; we allow writing
# inside it separately.
@@ -268,67 +263,64 @@
# real path and not a symlink for things to work (so we can't
# just remove the last path element in the string)
- debug-print "$FUNCNAME: checkout mode. creating cvs directory"
+ debug-print "${FUNCNAME}: checkout mode. creating cvs directory"
addwrite /foobar
addwrite /
- $run mkdir -p "/$ECVS_TOP_DIR"
+ ${run} mkdir -p "/${ECVS_TOP_DIR}"
export SANDBOX_WRITE="${SANDBOX_WRITE//:\/foobar:\/}"
fi
# In case ECVS_TOP_DIR is a symlink to a dir, get the real path,
# otherwise addwrite() doesn't work.
- cd -P "$ECVS_TOP_DIR" > /dev/null
- ECVS_TOP_DIR="`/bin/pwd`"
+ cd -P "${ECVS_TOP_DIR}" >/dev/null
+ ECVS_TOP_DIR=$(pwd)
# Disable the sandbox for this dir
- addwrite "$ECVS_TOP_DIR"
+ addwrite "${ECVS_TOP_DIR}"
# Chown the directory and all of its contents
- if [ -n "$ECVS_RUNAS" ]; then
- $run chown -R "$ECVS_RUNAS" "/$ECVS_TOP_DIR"
+ if [[ -n ${ECVS_RUNAS} ]] ; then
+ ${run} chown -R "${ECVS_RUNAS}" "/${ECVS_TOP_DIR}"
fi
# Determine the CVS command mode (checkout or update)
- if [ ! -d "$ECVS_TOP_DIR/$ECVS_LOCALNAME/CVS" ]; then
+ if [[ ! -d ${ECVS_TOP_DIR}/${ECVS_LOCALNAME}/CVS ]] ; then
mode=checkout
else
mode=update
fi
-
# Our server string (i.e. CVSROOT) without the password so it can
# be put in Root
- if [ "$ECVS_AUTH" == "no" ]
- then
+ if [[ ${ECVS_AUTH} == "no" ]] ; then
local server="${ECVS_USER}@${ECVS_SERVER}"
else
local connection="${ECVS_AUTH}"
- [[ -n ${ECVS_PROXY} ]] && connection="${connection};proxy=${ECVS_PROXY}"
- [[ -n ${ECVS_PROXY_PORT} ]] && connection="${connection};proxyport=${ECVS_PROXY_PORT}"
+ [[ -n ${ECVS_PROXY} ]] && connection+=";proxy=${ECVS_PROXY}"
+ [[ -n ${ECVS_PROXY_PORT} ]] && connection+=";proxyport=${ECVS_PROXY_PORT}"
local server=":${connection}:${ECVS_USER}@${ECVS_SERVER}"
fi
# Switch servers automagically if needed
- if [ "$mode" == "update" ]; then
- cd /$ECVS_TOP_DIR/$ECVS_LOCALNAME
- local oldserver="`$run cat CVS/Root`"
- if [ "$server" != "$oldserver" ]; then
-
- einfo "Changing the CVS server from $oldserver to $server:"
- debug-print "$FUNCNAME: Changing the CVS server from $oldserver to $server:"
+ if [[ ${mode} == "update" ]] ; then
+ cd "/${ECVS_TOP_DIR}/${ECVS_LOCALNAME}"
+ local oldserver=$(${run} cat CVS/Root)
+ if [[ ${server} != "${oldserver}" ]] ; then
+ einfo "Changing the CVS server from ${oldserver} to ${server}:"
+ debug-print "${FUNCNAME}: Changing the CVS server from ${oldserver} to ${server}:"
einfo "Searching for CVS directories ..."
- local cvsdirs="`$run find . -iname CVS -print`"
- debug-print "$FUNCNAME: CVS directories found:"
- debug-print "$cvsdirs"
+ local cvsdirs=$(${run} find . -iname CVS -print)
+ debug-print "${FUNCNAME}: CVS directories found:"
+ debug-print "${cvsdirs}"
einfo "Modifying CVS directories ..."
- for x in $cvsdirs; do
- debug-print "In $x"
- $run echo "$server" > "$x/Root"
+ local x
+ for x in ${cvsdirs} ; do
+ debug-print "In ${x}"
+ ${run} echo "${server}" > "${x}/Root"
done
-
fi
fi
@@ -336,8 +328,8 @@
# mess with ~/.cvspass
touch "${T}/cvspass"
export CVS_PASSFILE="${T}/cvspass"
- if [ -n "$ECVS_RUNAS" ]; then
- chown "$ECVS_RUNAS" "${T}/cvspass"
+ if [[ -n ${ECVS_RUNAS} ]] ; then
+ chown "${ECVS_RUNAS}" "${T}/cvspass"
fi
# The server string with the password in it, for login
@@ -345,8 +337,7 @@
# Ditto without the password, for checkout/update after login, so
# that the CVS/Root files don't contain the password in plaintext
- if [ "$ECVS_AUTH" == "no" ]
- then
+ if [[ ${ECVS_AUTH} == "no" ]] ; then
cvsroot_nopass="${ECVS_USER}@${ECVS_SERVER}"
else
cvsroot_nopass=":${ECVS_AUTH}:${ECVS_USER}@${ECVS_SERVER}"
@@ -360,37 +351,35 @@
# Execute commands
cd "${ECVS_TOP_DIR}"
- if [ "${ECVS_AUTH}" == "pserver" ]; then
- einfo "Running $cmdlogin"
- eval $cmdlogin || die "cvs login command failed"
- if [ "${mode}" == "update" ]; then
- einfo "Running $cmdupdate"
- eval $cmdupdate || die "cvs update command failed"
- elif [ "${mode}" == "checkout" ]; then
- einfo "Running $cmdcheckout"
- eval $cmdcheckout|| die "cvs checkout command failed"
+ if [[ ${ECVS_AUTH} == "pserver" ]] ; then
+ einfo "Running ${cmdlogin}"
+ eval ${cmdlogin} || die "cvs login command failed"
+ if [[ ${mode} == "update" ]] ; then
+ einfo "Running ${cmdupdate}"
+ eval ${cmdupdate} || die "cvs update command failed"
+ elif [[ ${mode} == "checkout" ]] ; then
+ einfo "Running ${cmdcheckout}"
+ eval ${cmdcheckout} || die "cvs checkout command failed"
fi
- elif [ "${ECVS_AUTH}" == "ext" ] || [ "${ECVS_AUTH}" == "no" ]; then
-
+ elif [[ ${ECVS_AUTH} == "ext" || ${ECVS_AUTH} == "no" ]] ; then
# Hack to support SSH password authentication
# Backup environment variable values
local CVS_ECLASS_ORIG_CVS_RSH="${CVS_RSH}"
- if [ "${SSH_ASKPASS+set}" == "set" ]; then
+ if [[ ${SSH_ASKPASS+set} == "set" ]] ; then
local CVS_ECLASS_ORIG_SSH_ASKPASS="${SSH_ASKPASS}"
else
unset CVS_ECLASS_ORIG_SSH_ASKPASS
fi
- if [ "${DISPLAY+set}" == "set" ]; then
+ if [[ ${DISPLAY+set} == "set" ]] ; then
local CVS_ECLASS_ORIG_DISPLAY="${DISPLAY}"
else
unset CVS_ECLASS_ORIG_DISPLAY
fi
- if [ "${CVS_RSH}" == "ssh" ]; then
-
+ if [[ ${CVS_RSH} == "ssh" ]] ; then
# Force SSH to use SSH_ASKPASS by creating python wrapper
export CVS_RSH="${T}/cvs_sshwrapper"
@@ -425,7 +414,7 @@
echo "newarglist.insert(1, '-oUserKnownHostsFile=${CVS_ECLASS_KNOWN_HOSTS}')" \
>> "${CVS_RSH}"
- if [ -z "${ECVS_SSH_HOST_KEY}" ]; then
+ if [[ -z ${ECVS_SSH_HOST_KEY} ]] ; then
ewarn "Warning: The SSH host key of the remote server will not be verified."
einfo "A temporary known hosts list will be used."
local CVS_ECLASS_STRICT_HOST_CHECKING="no"
@@ -447,40 +436,39 @@
# Make sure DISPLAY is set (SSH will not use SSH_ASKPASS
# if DISPLAY is not set)
- [ -z "${DISPLAY}" ] && DISPLAY="DISPLAY"
+ : ${DISPLAY:="DISPLAY"}
export DISPLAY
- # Create a dummy executable to echo $ECVS_PASS
+ # Create a dummy executable to echo ${ECVS_PASS}
export SSH_ASKPASS="${T}/cvs_sshechopass"
- if [ "${ECVS_AUTH}" != "no" ]; then
- echo -en "#!/bin/bash\necho \"$ECVS_PASS\"\n" \
+ if [[ ${ECVS_AUTH} != "no" ]] ; then
+ echo -en "#!/bin/bash\necho \"${ECVS_PASS}\"\n" \
> "${SSH_ASKPASS}"
else
echo -en "#!/bin/bash\nreturn\n" \
> "${SSH_ASKPASS}"
-
fi
chmod a+x "${SSH_ASKPASS}"
fi
- if [ "${mode}" == "update" ]; then
- einfo "Running $cmdupdate"
- eval $cmdupdate || die "cvs update command failed"
- elif [ "${mode}" == "checkout" ]; then
- einfo "Running $cmdcheckout"
- eval $cmdcheckout|| die "cvs checkout command failed"
+ if [[ ${mode} == "update" ]] ; then
+ einfo "Running ${cmdupdate}"
+ eval ${cmdupdate} || die "cvs update command failed"
+ elif [[ ${mode} == "checkout" ]] ; then
+ einfo "Running ${cmdcheckout}"
+ eval ${cmdcheckout} || die "cvs checkout command failed"
fi
# Restore environment variable values
export CVS_RSH="${CVS_ECLASS_ORIG_CVS_RSH}"
- if [ "${CVS_ECLASS_ORIG_SSH_ASKPASS+set}" == "set" ]; then
+ if [[ ${CVS_ECLASS_ORIG_SSH_ASKPASS+set} == "set" ]] ; then
export SSH_ASKPASS="${CVS_ECLASS_ORIG_SSH_ASKPASS}"
else
unset SSH_ASKPASS
fi
- if [ "${CVS_ECLASS_ORIG_DISPLAY+set}" == "set" ]; then
+ if [[ ${CVS_ECLASS_ORIG_DISPLAY+set} == "set" ]] ; then
export DISPLAY="${CVS_ECLASS_ORIG_DISPLAY}"
else
unset DISPLAY
@@ -489,8 +477,8 @@
# Restore ownership. Not sure why this is needed, but someone
# added it in the orig ECVS_RUNAS stuff.
- if [ -n "$ECVS_RUNAS" ]; then
- chown `whoami` "${T}/cvspass"
+ if [[ -n ${ECVS_RUNAS} ]] ; then
+ chown $(whoami) "${T}/cvspass"
fi
}
@@ -500,76 +488,77 @@
# The cvs src_unpack function, which will be exported
cvs_src_unpack() {
- debug-print-function $FUNCNAME $*
-
- debug-print "$FUNCNAME: init:
- ECVS_CVS_COMMAND=$ECVS_CVS_COMMAND
- ECVS_UP_OPTS=$ECVS_UP_OPTS
- ECVS_CO_OPTS=$ECVS_CO_OPTS
- ECVS_TOP_DIR=$ECVS_TOP_DIR
- ECVS_SERVER=$ECVS_SERVER
- ECVS_USER=$ECVS_USER
- ECVS_PASS=$ECVS_PASS
- ECVS_MODULE=$ECVS_MODULE
- ECVS_LOCAL=$ECVS_LOCAL
- ECVS_RUNAS=$ECVS_RUNAS
- ECVS_LOCALNAME=$ECVS_LOCALNAME"
+ debug-print-function ${FUNCNAME} "$@"
- [ -z "$ECVS_MODULE" ] && die "ERROR: CVS module not set, cannot continue."
+ debug-print "${FUNCNAME}: init:
+ ECVS_CVS_COMMAND=${ECVS_CVS_COMMAND}
+ ECVS_UP_OPTS=${ECVS_UP_OPTS}
+ ECVS_CO_OPTS=${ECVS_CO_OPTS}
+ ECVS_TOP_DIR=${ECVS_TOP_DIR}
+ ECVS_SERVER=${ECVS_SERVER}
+ ECVS_USER=${ECVS_USER}
+ ECVS_PASS=${ECVS_PASS}
+ ECVS_MODULE=${ECVS_MODULE}
+ ECVS_LOCAL=${ECVS_LOCAL}
+ ECVS_RUNAS=${ECVS_RUNAS}
+ ECVS_LOCALNAME=${ECVS_LOCALNAME}"
- local ECVS_LOCALNAME="${ECVS_LOCALNAME}"
+ [[ -z ${ECVS_MODULE} ]] && die "ERROR: CVS module not set, cannot continue."
- if [ -z "$ECVS_LOCALNAME" ]; then
- ECVS_LOCALNAME="$ECVS_MODULE"
- fi
+ local ECVS_LOCALNAME=${ECVS_LOCALNAME:-${ECVS_MODULE}}
local sanitized_pn=$(echo "${PN}" | LC_ALL=C sed -e 's:[^A-Za-z0-9_]:_:g')
local offline_pkg_var="ECVS_OFFLINE_${sanitized_pn}"
- if [[ -n ${!offline_pkg_var}${ECVS_OFFLINE} ]] || [[ "$ECVS_SERVER" == "offline" ]] ; then
+ if [[ -n ${!offline_pkg_var}${ECVS_OFFLINE} ]] || [[ ${ECVS_SERVER} == "offline" ]] ; then
# We're not required to fetch anything; the module already
# exists and shouldn't be updated.
- if [ -d "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}" ]; then
- debug-print "$FUNCNAME: offline mode"
+ if [[ -d ${ECVS_TOP_DIR}/${ECVS_LOCALNAME} ]] ; then
+ debug-print "${FUNCNAME}: offline mode"
else
- debug-print "$FUNCNAME: Offline mode specified but directory ${ECVS_TOP_DIR}/${ECVS_LOCALNAME} not found, exiting with error"
+ debug-print "${FUNCNAME}: Offline mode specified but directory ${ECVS_TOP_DIR}/${ECVS_LOCALNAME} not found, exiting with error"
die "ERROR: Offline mode specified, but directory ${ECVS_TOP_DIR}/${ECVS_LOCALNAME} not found. Aborting."
fi
- elif [ -n "$ECVS_SERVER" ]; then # ECVS_SERVER!=offline --> real fetching mode
- einfo "Fetching CVS module $ECVS_MODULE into $ECVS_TOP_DIR ..."
+ elif [[ -n ${ECVS_SERVER} ]] ; then # ECVS_SERVER!=offline --> real fetching mode
+ einfo "Fetching CVS module ${ECVS_MODULE} into ${ECVS_TOP_DIR} ..."
cvs_fetch
else # ECVS_SERVER not set
die "ERROR: CVS server not specified, cannot continue."
fi
- einfo "Copying $ECVS_MODULE from $ECVS_TOP_DIR ..."
- debug-print "Copying module $ECVS_MODULE local_mode=$ECVS_LOCAL from $ECVS_TOP_DIR ..."
+ einfo "Copying ${ECVS_MODULE} from ${ECVS_TOP_DIR} ..."
+ debug-print "Copying module ${ECVS_MODULE} local_mode=${ECVS_LOCAL} from ${ECVS_TOP_DIR} ..."
# This is probably redundant, but best to make sure.
- mkdir -p "$WORKDIR/$ECVS_LOCALNAME"
+ mkdir -p "${WORKDIR}/${ECVS_LOCALNAME}"
- if [ -n "$ECVS_LOCAL" ]; then
- cp -f "$ECVS_TOP_DIR/$ECVS_LOCALNAME"/* "$WORKDIR/$ECVS_LOCALNAME"
+ if [[ -n ${ECVS_LOCAL} ]] ; then
+ cp -f "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}"/* "${WORKDIR}/${ECVS_LOCALNAME}"
else
- cp -Rf "$ECVS_TOP_DIR/$ECVS_LOCALNAME" "$WORKDIR/$ECVS_LOCALNAME/.."
+ cp -Rf "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}" "${WORKDIR}/${ECVS_LOCALNAME}/.."
fi
# Not exactly perfect, but should be pretty close #333773
- export ECVS_VERSION=$(find "$ECVS_TOP_DIR/$ECVS_LOCALNAME/" -ipath '*/CVS/Entries' -exec cat {} + | LC_ALL=C sort | sha1sum | awk '{print $1}')
+ export ECVS_VERSION=$(
+ find "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}/" -ipath '*/CVS/Entries' -exec cat {} + | \
+ LC_ALL=C sort | \
+ sha1sum | \
+ awk '{print $1}'
+ )
# If the directory is empty, remove it; empty directories cannot
# exist in cvs. This happens when, for example, kde-source
# requests module/doc/subdir which doesn't exist. Still create
# the empty directory in workdir though.
- if [ "`ls -A \"${ECVS_TOP_DIR}/${ECVS_LOCALNAME}\"`" == "CVS" ]; then
- debug-print "$FUNCNAME: removing empty CVS directory $ECVS_LOCALNAME"
+ if [[ $(ls -A "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}") == "CVS" ]] ; then
+ debug-print "${FUNCNAME}: removing empty CVS directory ${ECVS_LOCALNAME}"
rm -rf "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}"
fi
# Implement some of base_src_unpack's functionality; note however
# that base.eclass may not have been inherited!
- if [ -n "$PATCHES" ]; then
- debug-print "$FUNCNAME: PATCHES=$PATCHES, S=$S, autopatching"
- cd "$S"
+ if [[ -n ${PATCHES} ]] ; then
+ debug-print "${FUNCNAME}: PATCHES=${PATCHES,} S=${S}, autopatching"
+ cd "${S}"
epatch ${PATCHES}
# Make sure we don't try to apply patches more than once,
# since cvs_src_unpack is usually called several times from
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: cvs.eclass
@ 2013-01-22 7:26 Mike Frysinger (vapier)
0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger (vapier) @ 2013-01-22 7:26 UTC (permalink / raw
To: gentoo-commits
vapier 13/01/22 07:26:25
Modified: cvs.eclass
Log:
drop ECVS_SUBDIR as nothing in the tree uses it
Revision Changes Path
1.80 eclass/cvs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.80&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.80&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?r1=1.79&r2=1.80
Index: cvs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- cvs.eclass 22 Jan 2013 07:25:59 -0000 1.79
+++ cvs.eclass 22 Jan 2013 07:26:25 -0000 1.80
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.79 2013/01/22 07:25:59 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.80 2013/01/22 07:26:25 vapier Exp $
# @ECLASS: cvs.eclass
# @MAINTAINER:
@@ -178,9 +178,6 @@
# : ${ECVS_RUNAS:=$(whoami)}
-# ECVS_SUBDIR -- deprecated, do not use
-[[ -n ${ECVS_SUBDIR} ]] && die "ERROR: deprecated ECVS_SUBDIR defined. Please fix this ebuild."
-
# add cvs to deps
# ssh is used for ext auth
# sudo is used to run as a specified user
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: cvs.eclass
@ 2013-01-22 7:29 Mike Frysinger (vapier)
0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger (vapier) @ 2013-01-22 7:29 UTC (permalink / raw
To: gentoo-commits
vapier 13/01/22 07:29:03
Modified: cvs.eclass
Log:
add support for checking out via a date string (-D) by Thomas Rausch #443014
Revision Changes Path
1.81 eclass/cvs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.81&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?rev=1.81&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/cvs.eclass?r1=1.80&r2=1.81
Index: cvs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- cvs.eclass 22 Jan 2013 07:26:25 -0000 1.80
+++ cvs.eclass 22 Jan 2013 07:29:02 -0000 1.81
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.80 2013/01/22 07:26:25 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.81 2013/01/22 07:29:02 vapier Exp $
# @ECLASS: cvs.eclass
# @MAINTAINER:
@@ -117,6 +117,12 @@
# several directory levels, i.e. "foo/bar/baz"
#[[ -z ${ECVS_MODULE} ]] && die "$ECLASS: error: ECVS_MODULE not set, cannot continue"
+# @ECLASS-VARIABLE: ECVS_DATE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The date of the checkout. See the -D date_spec option in the cvs
+# man page for more details.
+
# @ECLASS-VARIABLE: ECVS_BRANCH
# @DEFAULT_UNSET
# @DESCRIPTION:
@@ -239,6 +245,11 @@
ECVS_UP_OPTS+=" -C"
fi
+ if [[ -n ${ECVS_DATE} ]] ; then
+ ECVS_CO_OPTS+=" -D ${ECVS_DATE}"
+ ECVS_UP_OPTS+=" -D ${ECVS_DATE}"
+ fi
+
# It would be easiest to always be in "run-as mode", logic-wise,
# if sudo didn't ask for a password even when sudo'ing to `whoami`.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-01-22 7:29 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-22 7:26 [gentoo-commits] gentoo-x86 commit in eclass: cvs.eclass Mike Frysinger (vapier)
-- strict thread matches above, loose matches on Subject: below --
2013-01-22 7:29 Mike Frysinger (vapier)
2013-01-22 7:25 Mike Frysinger (vapier)
2013-01-22 7:02 Mike Frysinger (vapier)
2010-08-25 19:57 Mike Frysinger (vapier)
2010-08-24 21:00 Mike Frysinger (vapier)
2010-08-22 20:50 Mike Frysinger (vapier)
2010-08-21 18:21 Mike Frysinger (vapier)
2008-04-27 7:00 Ulrich Mueller (ulm)
2008-03-06 0:54 Bo Oersted Andresen (zlin)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox