public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in eclass: darcs.eclass
@ 2007-11-01 19:24 Lennart Kolmodin (kolmodin)
  0 siblings, 0 replies; 7+ messages in thread
From: Lennart Kolmodin (kolmodin) @ 2007-11-01 19:24 UTC (permalink / raw
  To: gentoo-commits

kolmodin    07/11/01 19:24:24

  Modified:             darcs.eclass
  Log:
  Make the darcs eclass copy using rsync instead of cp like most other SCM
  eclasses to exclude the _darcs directory.
  Patch by Avuton Olrich <avuton@gmail.com>.

Revision  Changes    Path
1.6                  eclass/darcs.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/darcs.eclass?rev=1.6&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/darcs.eclass?rev=1.6&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/darcs.eclass?r1=1.5&r2=1.6

Index: darcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- darcs.eclass	17 Jun 2007 21:33:57 -0000	1.5
+++ darcs.eclass	1 Nov 2007 19:24:24 -0000	1.6
@@ -1,6 +1,6 @@
 # Copyright 2004 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.5 2007/06/17 21:33:57 kolmodin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.6 2007/11/01 19:24:24 kolmodin Exp $
 #
 # darcs eclass author:  Andres Loeh <kosmikus@gentoo.org>
 # tla eclass author:    <rphillips@gentoo.org>
@@ -142,7 +142,7 @@
 
 	EDARCS_SHOPT=$(shopt -p dotglob)
 	shopt -s dotglob	# get any dotfiles too.
-	cp -Rf "$EDARCS_TOP_DIR/$EDARCS_LOCALREPO"/* "${WORKDIR}/${P}"
+	rsync -rlpgo --exclude="_darcs/"  "$EDARCS_TOP_DIR/$EDARCS_LOCALREPO"/* "${WORKDIR}/${P}"
 	eval ${EDARCS_SHOPT}    # reset shopt
 
 	einfo "Darcs repository contents are now in ${WORKDIR}/${P}"



-- 
gentoo-commits@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: darcs.eclass
@ 2008-05-14 18:13 Lennart Kolmodin (kolmodin)
  0 siblings, 0 replies; 7+ messages in thread
From: Lennart Kolmodin (kolmodin) @ 2008-05-14 18:13 UTC (permalink / raw
  To: gentoo-commits

kolmodin    08/05/14 18:13:14

  Modified:             darcs.eclass
  Log:
  Makes *-darcs work with newer portage and pkgcore.
  Patch by mjrosennb@andrew.cmu.edu.

Revision  Changes    Path
1.7                  eclass/darcs.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/darcs.eclass?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/darcs.eclass?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/darcs.eclass?r1=1.6&r2=1.7

Index: darcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- darcs.eclass	1 Nov 2007 19:24:24 -0000	1.6
+++ darcs.eclass	14 May 2008 18:13:14 -0000	1.7
@@ -1,6 +1,6 @@
 # Copyright 2004 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.6 2007/11/01 19:24:24 kolmodin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.7 2008/05/14 18:13:14 kolmodin Exp $
 #
 # darcs eclass author:  Andres Loeh <kosmikus@gentoo.org>
 # tla eclass author:    <rphillips@gentoo.org>
@@ -43,11 +43,6 @@
 # The URI to the repository.
 [ -z "$EDARCS_REPOSITORY" ] && EDARCS_REPOSITORY=""
 
-# The local directory to store the repository (useful to ensure a
-# unique local name); relative to EDARCS_TOP_DIR
-[ -z "$EDARCS_LOCALREPO" ] && [ -n "$EDARCS_REPOSITORY" ] \
-	&& EDARCS_LOCALREPO=${EDARCS_REPOSITORY%/} \
-	&& EDARCS_LOCALREPO=${EDARCS_LOCALREPO##*/}
 
 # EDARCS_CLEAN: set this to something to get a clean copy when updating
 # (removes the working directory, then uses $EDARCS_GET_CMD to
@@ -61,6 +56,12 @@
 # is called from darcs_src_unpack
 darcs_fetch() {
 
+	# The local directory to store the repository (useful to ensure a
+	# unique local name); relative to EDARCS_TOP_DIR
+	[ -z "$EDARCS_LOCALREPO" ] && [ -n "$EDARCS_REPOSITORY" ] \
+		&& EDARCS_LOCALREPO=${EDARCS_REPOSITORY%/} \
+		&& EDARCS_LOCALREPO=${EDARCS_LOCALREPO##*/}
+
 	debug-print-function $FUNCNAME $*
 
 	if [ -n "$EDARCS_CLEAN" ]; then
@@ -116,6 +117,11 @@
 
 
 darcs_src_unpack() {
+	# The local directory to store the repository (useful to ensure a
+	# unique local name); relative to EDARCS_TOP_DIR
+	[ -z "$EDARCS_LOCALREPO" ] && [ -n "$EDARCS_REPOSITORY" ] \
+		&& EDARCS_LOCALREPO=${EDARCS_REPOSITORY%/} \
+		&& EDARCS_LOCALREPO=${EDARCS_LOCALREPO##*/}
 	local EDARCS_SHOPT
 
 	debug-print-function $FUNCNAME $*



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: darcs.eclass
@ 2010-03-14 12:31 Lennart Kolmodin (kolmodin)
  0 siblings, 0 replies; 7+ messages in thread
From: Lennart Kolmodin (kolmodin) @ 2010-03-14 12:31 UTC (permalink / raw
  To: gentoo-commits

kolmodin    10/03/14 12:31:42

  Modified:             darcs.eclass
  Log:
  Update darcs.eclass to use dev-vcs/darcs instead of dev-util/darcs.

Revision  Changes    Path
1.8                  eclass/darcs.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/darcs.eclass?rev=1.8&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/darcs.eclass?rev=1.8&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/darcs.eclass?r1=1.7&r2=1.8

Index: darcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- darcs.eclass	14 May 2008 18:13:14 -0000	1.7
+++ darcs.eclass	14 Mar 2010 12:31:41 -0000	1.8
@@ -1,6 +1,6 @@
 # Copyright 2004 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.7 2008/05/14 18:13:14 kolmodin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.8 2010/03/14 12:31:41 kolmodin Exp $
 #
 # darcs eclass author:  Andres Loeh <kosmikus@gentoo.org>
 # tla eclass author:    <rphillips@gentoo.org>
@@ -51,7 +51,7 @@
 # --- end ebuild-configurable settings ---
 
 # add darcs to deps
-DEPEND="dev-util/darcs"
+DEPEND="dev-vcs/darcs"
 
 # is called from darcs_src_unpack
 darcs_fetch() {






^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: darcs.eclass
@ 2010-07-19  2:52 Sergei Trofimovich (slyfox)
  0 siblings, 0 replies; 7+ messages in thread
From: Sergei Trofimovich (slyfox) @ 2010-07-19  2:52 UTC (permalink / raw
  To: gentoo-commits

slyfox      10/07/19 02:52:15

  Modified:             darcs.eclass
  Log:
  convert to eshopts_{push,pop} (bug #328869)
  
  Thanks to Mike Frysinger <vapier@gentoo.org> for the report and fix.

Revision  Changes    Path
1.9                  eclass/darcs.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?r1=1.8&r2=1.9

Index: darcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- darcs.eclass	14 Mar 2010 12:31:41 -0000	1.8
+++ darcs.eclass	19 Jul 2010 02:52:14 -0000	1.9
@@ -1,6 +1,6 @@
 # Copyright 2004 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.8 2010/03/14 12:31:41 kolmodin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.9 2010/07/19 02:52:14 slyfox Exp $
 #
 # darcs eclass author:  Andres Loeh <kosmikus@gentoo.org>
 # tla eclass author:    <rphillips@gentoo.org>
@@ -19,6 +19,8 @@
 
 # TODO: support for tags, ...
 
+inherit eutils # eshopts_{push,pop}
+
 # Don't download anything other than the darcs repository
 SRC_URI=""
 
@@ -122,7 +124,6 @@
 	[ -z "$EDARCS_LOCALREPO" ] && [ -n "$EDARCS_REPOSITORY" ] \
 		&& EDARCS_LOCALREPO=${EDARCS_REPOSITORY%/} \
 		&& EDARCS_LOCALREPO=${EDARCS_LOCALREPO##*/}
-	local EDARCS_SHOPT
 
 	debug-print-function $FUNCNAME $*
 
@@ -146,10 +147,9 @@
 	# Use ${WORKDIR}/${P} rather than ${S} so user can point ${S} to something inside.
 	mkdir -p "${WORKDIR}/${P}"
 
-	EDARCS_SHOPT=$(shopt -p dotglob)
-	shopt -s dotglob	# get any dotfiles too.
+	eshopts_push -s dotglob	# get any dotfiles too.
 	rsync -rlpgo --exclude="_darcs/"  "$EDARCS_TOP_DIR/$EDARCS_LOCALREPO"/* "${WORKDIR}/${P}"
-	eval ${EDARCS_SHOPT}    # reset shopt
+	eshopts_pop
 
 	einfo "Darcs repository contents are now in ${WORKDIR}/${P}"
 






^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: darcs.eclass
@ 2010-11-01 20:54 Sergei Trofimovich (slyfox)
  0 siblings, 0 replies; 7+ messages in thread
From: Sergei Trofimovich (slyfox) @ 2010-11-01 20:54 UTC (permalink / raw
  To: gentoo-commits

slyfox      10/11/01 20:54:46

  Modified:             darcs.eclass
  Log:
  darcs.eclass: export EDARCS_PATCHCOUNT: var shows amount of patches in pulled repository
  
  This feature is requested for 'app-portage/smart-live-rebuild' program
  (already provided by other SCM eclasses) (bug #343581)
  
  Thre request and implementation hints by
  Alexander Vershilov <alexander.vershilov@gmail.com>.
  Implementation by Michał Górny <mgorny@gentoo.org>.
  
  Thank you, guys!

Revision  Changes    Path
1.10                 eclass/darcs.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?r1=1.9&r2=1.10

Index: darcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- darcs.eclass	19 Jul 2010 02:52:14 -0000	1.9
+++ darcs.eclass	1 Nov 2010 20:54:46 -0000	1.10
@@ -1,6 +1,6 @@
 # Copyright 2004 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.9 2010/07/19 02:52:14 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.10 2010/11/01 20:54:46 slyfox Exp $
 #
 # darcs eclass author:  Andres Loeh <kosmikus@gentoo.org>
 # tla eclass author:    <rphillips@gentoo.org>
@@ -55,6 +55,12 @@
 # add darcs to deps
 DEPEND="dev-vcs/darcs"
 
+darcs_patchcount() {
+	set -- $(${EDARCS_DARCS_CMD} show repo | grep "Num Patches")
+	# handle string like: "    Num Patches: 3860"
+	echo ${3}
+}
+
 # is called from darcs_src_unpack
 darcs_fetch() {
 
@@ -114,6 +120,9 @@
 		eval $cmdupdate || die "darcs update command failed"
 	fi
 
+	export EDARCS_PATCHCOUNT=$(darcs_patchcount)
+	einfo "    patches in repo: ${EDARCS_PATCHCOUNT}"
+
 	popd
 }
 






^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: darcs.eclass
@ 2011-01-30 10:27 Sergei Trofimovich (slyfox)
  0 siblings, 0 replies; 7+ messages in thread
From: Sergei Trofimovich (slyfox) @ 2011-01-30 10:27 UTC (permalink / raw
  To: gentoo-commits

slyfox      11/01/30 10:27:20

  Modified:             darcs.eclass
  Log:
  Add ESCM_OFFLINE variable support.
  
  Cleaned-up an eclass. Make it 'eclass-manpages' friendly.
  
  Thanks to Alexander Vershilov for ESCM_OFFLINE support (bug #353052)
  and thanks to mren <bugs@rennings.net> for documentation support (bug #211221)

Revision  Changes    Path
1.11                 eclass/darcs.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?r1=1.10&r2=1.11

Index: darcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- darcs.eclass	1 Nov 2010 20:54:46 -0000	1.10
+++ darcs.eclass	30 Jan 2011 10:27:20 -0000	1.11
@@ -1,23 +1,28 @@
-# Copyright 2004 Gentoo Technologies, Inc.
+# Copyright 2011 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.10 2010/11/01 20:54:46 slyfox Exp $
-#
-# darcs eclass author:  Andres Loeh <kosmikus@gentoo.org>
-# tla eclass author:    <rphillips@gentoo.org>
-# Original Author:      Jeffrey Yasskin <jyasskin@mail.utexas.edu>
+# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.11 2011/01/30 10:27:20 slyfox Exp $
+
+# @ECLASS: darcs.eclass
+# @MAINTAINER:
+# "Gentoo's Haskell Language team" <haskell@gentoo.org>
 #
-# Originally derived from the tla eclass, which is derived from the
-# cvs eclass.
+# Sergei Trofimovich <slyfox@gentoo.org>
 #
+# Original Author: Jeffrey Yasskin <jyasskin@mail.utexas.edu>
+# @BLURB: This eclass provides functions for fetch and unpack darcs repositories
+# @DESCRIPTION:
 # This eclass provides the generic darcs fetching functions.
-# to use from an ebuild, set the 'ebuild-configurable settings' below in your
-# ebuild before inheriting.  then either leave the default src_unpack or extend
-# over darcs_src_unpack.
+#
+# Define the EDARCS_REPOSITORY variable at least.
+# The ${S} variable is set to ${WORKDIR}/${P}.
+# @THANKS TO:
+#               <rphillips@gentoo.org> (tla eclass author)
+# Andres Loeh   <kosmikus@gentoo.org> (darcs.eclass author)
+# Alexander Vershilov <alexander.vershilov@gmail.com> (various contributions)
 
-# Most of the time, you will define only $EDARCS_REPOSITORY in your
-# ebuild.
+# TODO:
 
-# TODO: support for tags, ...
+# support for tags
 
 inherit eutils # eshopts_{push,pop}
 
@@ -30,94 +35,127 @@
 # --- begin ebuild-configurable settings
 
 # darcs command to run
-[ -z "$EDARCS_DARCS_CMD" ] && EDARCS_DARCS_CMD="darcs"
+# @ECLASS-VARIABLE: EDARCS_DARCS_CMD
+# @DESCRIPTION:
+# Path to darcs binary.
+: ${EDARCS_DARCS_CMD:=darcs}
 
 # darcs commands with command-specific options
-[ -z "$EDARCS_GET_CMD" ] && EDARCS_GET_CMD="get --partial"
-[ -z "$EDARCS_UPDATE_CMD" ] && EDARCS_UPDATE_CMD="pull"
 
-# options to pass to both the "get" and "update" commands
-[ -z "$EDARCS_OPTIONS" ] && EDARCS_OPTIONS="--set-scripts-executable"
+# @ECLASS-VARIABLE: EDARCS_GET_CMD
+# @DESCRIPTION:
+# First fetch darcs command.
+: ${EDARCS_GET_CMD:=get --partial}
+
+# @ECLASS-VARIABLE: EDARCS_UPDATE_CMD
+# @DESCRIPTION:
+# Repo update darcs command.
+: ${EDARCS_UPDATE_CMD:=pull}
+
+# @ECLASS-VARIABLE: EDARCS_OPTIONS
+# @DESCRIPTION:
+# Options to pass to both the "get" and "update" commands
+: ${EDARCS_OPTIONS:=--set-scripts-executable}
 
+# @ECLASS-VARIABLE: EDARCS_TOP_DIR
+# @DESCRIPTION:
 # Where the darcs repositories are stored/accessed
-[ -z "$EDARCS_TOP_DIR" ] && EDARCS_TOP_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/darcs-src"
+: ${EDARCS_TOP_DIR:=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/darcs-src}
 
+# @ECLASS-VARIABLE: EDARCS_REPOSITORY
+# @DESCRIPTION:
 # The URI to the repository.
-[ -z "$EDARCS_REPOSITORY" ] && EDARCS_REPOSITORY=""
+: ${EDARCS_REPOSITORY:=}
 
-
-# EDARCS_CLEAN: set this to something to get a clean copy when updating
-# (removes the working directory, then uses $EDARCS_GET_CMD to
+# @ECLASS-VARIABLE: EDARCS_OFFLINE
+# @DESCRIPTION:
+# Set this variable to a non-empty value to disable the automatic updating of
+# a darcs repository. this is intended to be set outside the darcs source
+# tree by users.
+: ${EDARCS_OFFLINE:=${ESCM_OFFLINE}}
+
+# @ECLASS-VARIABLE: EDARCS_CLEAN
+# @DESCRIPTION:
+# Set this to something to get a clean copy when updating
+# (removes the working directory, then uses EDARCS_GET_CMD to
 # re-download it.)
+: ${EDARCS_CLEAN:=}
 
 # --- end ebuild-configurable settings ---
 
 # add darcs to deps
 DEPEND="dev-vcs/darcs"
 
+# @FUNCTION: darcs_patchcount
+# @DESCRIPTION:
+# Internal function to determine amount of patches in repository.
 darcs_patchcount() {
 	set -- $(${EDARCS_DARCS_CMD} show repo | grep "Num Patches")
 	# handle string like: "    Num Patches: 3860"
 	echo ${3}
 }
 
-# is called from darcs_src_unpack
+# @FUNCTION: darcs_fetch
+# @DESCRIPTION:
+# Internal function is called from darcs_src_unpack
 darcs_fetch() {
-
 	# The local directory to store the repository (useful to ensure a
 	# unique local name); relative to EDARCS_TOP_DIR
-	[ -z "$EDARCS_LOCALREPO" ] && [ -n "$EDARCS_REPOSITORY" ] \
+	[[ -z ${EDARCS_LOCALREPO} ]] && [[ -n ${EDARCS_REPOSITORY} ]] \
 		&& EDARCS_LOCALREPO=${EDARCS_REPOSITORY%/} \
 		&& EDARCS_LOCALREPO=${EDARCS_LOCALREPO##*/}
 
-	debug-print-function $FUNCNAME $*
+	debug-print-function ${FUNCNAME} $*
 
-	if [ -n "$EDARCS_CLEAN" ]; then
-		rm -rf $EDARCS_TOP_DIR/$EDARCS_LOCALREPO
+	if [[ -n ${EDARCS_CLEAN} ]]; then
+		addwrite "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}"
+		rm -rf "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}"
 	fi
 
 	# create the top dir if needed
-	if [ ! -d "$EDARCS_TOP_DIR" ]; then
+	if [[ ! -d ${EDARCS_TOP_DIR} ]]; then
 		# note that the addwrite statements in this block are only there to allow creating EDARCS_TOP_DIR;
 		# we've already allowed writing inside it
 		# this is because it's simpler than trying to find out the parent path of the directory, which
 		# would need to be the 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 darcs directory"
+		debug-print "${FUNCNAME}: checkout mode. creating darcs directory"
 		addwrite /foobar
 		addwrite /
-		mkdir -p "$EDARCS_TOP_DIR"
+		mkdir -p "${EDARCS_TOP_DIR}"
 		export SANDBOX_WRITE="${SANDBOX_WRITE//:\/foobar:\/}"
 	fi
 
 	# in case EDARCS_DARCS_DIR is a symlink to a dir, get the real
 	# dir's path, otherwise addwrite() doesn't work.
 	pushd .
-	cd -P "$EDARCS_TOP_DIR" > /dev/null
+	cd -P "${EDARCS_TOP_DIR}" > /dev/null
 	EDARCS_TOP_DIR="`/bin/pwd`"
 
 	# disable the sandbox for this dir
-	addwrite "$EDARCS_TOP_DIR"
+	addwrite "${EDARCS_TOP_DIR}"
 
 	# determine checkout or update mode and change to the right directory.
-	if [ ! -d "$EDARCS_TOP_DIR/$EDARCS_LOCALREPO/_darcs" ]; then
+	if [[ ! -d "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}/_darcs" ]]; then
 		mode=get
-		cd "$EDARCS_TOP_DIR"
+		cd "${EDARCS_TOP_DIR}"
 	else
 		mode=update
-		cd "$EDARCS_TOP_DIR/$EDARCS_LOCALREPO"
+		cd "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}"
 	fi
 
 	# commands to run
-	local cmdget="${EDARCS_DARCS_CMD} ${EDARCS_GET_CMD} ${EDARCS_OPTIONS} --repo-name=${EDARCS_LOCALREPO} ${EDARCS_REPOSITORY}"
-	local cmdupdate="${EDARCS_DARCS_CMD} ${EDARCS_UPDATE_CMD} --all ${EDARCS_OPTIONS} ${EDARCS_REPOSITORY}"
+	local    cmdget="${EDARCS_DARCS_CMD} ${EDARCS_GET_CMD}          ${EDARCS_OPTIONS} --repo-name=${EDARCS_LOCALREPO} ${EDARCS_REPOSITORY}"
+	local cmdupdate="${EDARCS_DARCS_CMD} ${EDARCS_UPDATE_CMD} --all ${EDARCS_OPTIONS}                                 ${EDARCS_REPOSITORY}"
 
-	if [ "${mode}" == "get" ]; then
-		einfo "Running $cmdget"
-		eval $cmdget || die "darcs get command failed"
-	elif [ "${mode}" == "update" ]; then
-		einfo "Running $cmdupdate"
-		eval $cmdupdate || die "darcs update command failed"
+	if [[ ${mode} == "get" ]]; then
+		einfo "Running ${cmdget}"
+		eval ${cmdget} || die "darcs get command failed"
+	elif [[ -n ${EDARCS_OFFLINE} ]] ; then
+		einfo "Offline update"
+	elif [[ ${mode} == "update" ]]; then
+		einfo "Running ${cmdupdate}"
+		eval ${cmdupdate} || die "darcs update command failed"
 	fi
 
 	export EDARCS_PATCHCOUNT=$(darcs_patchcount)
@@ -126,38 +164,40 @@
 	popd
 }
 
-
+# @FUNCTION: darcs_src_unpack
+# @DESCRIPTION:
+# src_upack function
 darcs_src_unpack() {
 	# The local directory to store the repository (useful to ensure a
 	# unique local name); relative to EDARCS_TOP_DIR
-	[ -z "$EDARCS_LOCALREPO" ] && [ -n "$EDARCS_REPOSITORY" ] \
+	[[ -z ${EDARCS_LOCALREPO} ]] && [[ -n ${EDARCS_REPOSITORY} ]] \
 		&& EDARCS_LOCALREPO=${EDARCS_REPOSITORY%/} \
 		&& EDARCS_LOCALREPO=${EDARCS_LOCALREPO##*/}
 
-	debug-print-function $FUNCNAME $*
+	debug-print-function ${FUNCNAME} $*
 
-	debug-print "$FUNCNAME: init:
-	EDARCS_DARCS_CMD=$EDARCS_DARCS_CMD
-	EDARCS_GET_CMD=$EDARCS_GET_CMD
-	EDARCS_UPDATE_CMD=$EDARCS_UPDATE_CMD
-	EDARCS_OPTIONS=$EDARCS_OPTIONS
-	EDARCS_TOP_DIR=$EDARCS_TOP_DIR
-	EDARCS_REPOSITORY=$EDARCS_REPOSITORY
-	EDARCS_LOCALREPO=$EDARCS_LOCALREPO
-	EDARCS_CLEAN=$EDARCS_CLEAN"
+	debug-print "${FUNCNAME}: init:
+	EDARCS_DARCS_CMD=${EDARCS_DARCS_CMD}
+	EDARCS_GET_CMD=${EDARCS_GET_CMD}
+	EDARCS_UPDATE_CMD=${EDARCS_UPDATE_CMD}
+	EDARCS_OPTIONS=${EDARCS_OPTIONS}
+	EDARCS_TOP_DIR=${EDARCS_TOP_DIR}
+	EDARCS_REPOSITORY=${EDARCS_REPOSITORY}
+	EDARCS_LOCALREPO=${EDARCS_LOCALREPO}
+	EDARCS_CLEAN=${EDARCS_CLEAN}"
 
-	einfo "Fetching darcs repository $EDARCS_REPOSITORY into $EDARCS_TOP_DIR..."
+	einfo "Fetching darcs repository ${EDARCS_REPOSITORY} into ${EDARCS_TOP_DIR}..."
 	darcs_fetch
 
-	einfo "Copying $EDARCS_LOCALREPO from $EDARCS_TOP_DIR..."
-	debug-print "Copying $EDARCS_LOCALREPO from $EDARCS_TOP_DIR..."
+	einfo "Copying ${EDARCS_LOCALREPO} from ${EDARCS_TOP_DIR}..."
+	debug-print "Copying ${EDARCS_LOCALREPO} from ${EDARCS_TOP_DIR}..."
 
 	# probably redundant, but best to make sure
 	# Use ${WORKDIR}/${P} rather than ${S} so user can point ${S} to something inside.
 	mkdir -p "${WORKDIR}/${P}"
 
 	eshopts_push -s dotglob	# get any dotfiles too.
-	rsync -rlpgo --exclude="_darcs/"  "$EDARCS_TOP_DIR/$EDARCS_LOCALREPO"/* "${WORKDIR}/${P}"
+	rsync -rlpgo --exclude="_darcs/"  "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}"/* "${WORKDIR}/${P}"
 	eshopts_pop
 
 	einfo "Darcs repository contents are now in ${WORKDIR}/${P}"






^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: darcs.eclass
@ 2012-06-08  3:39 Mike Frysinger (vapier)
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger (vapier) @ 2012-06-08  3:39 UTC (permalink / raw
  To: gentoo-commits

vapier      12/06/08 03:39:50

  Modified:             darcs.eclass
  Log:
  merge @THANKS into @AUTHOR as @THANKS does not exist

Revision  Changes    Path
1.16                 eclass/darcs.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/darcs.eclass?r1=1.15&r2=1.16

Index: darcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- darcs.eclass	30 May 2012 15:25:08 -0000	1.15
+++ darcs.eclass	8 Jun 2012 03:39:50 -0000	1.16
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.15 2012/05/30 15:25:08 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/darcs.eclass,v 1.16 2012/06/08 03:39:50 vapier Exp $
 
 # @ECLASS: darcs.eclass
 # @MAINTAINER:
@@ -8,16 +8,15 @@
 # Sergei Trofimovich <slyfox@gentoo.org>
 # @AUTHOR:
 # Original Author: Jeffrey Yasskin <jyasskin@mail.utexas.edu>
+#               <rphillips@gentoo.org> (tla eclass author)
+# Andres Loeh   <kosmikus@gentoo.org> (darcs.eclass author)
+# Alexander Vershilov <alexander.vershilov@gmail.com> (various contributions)
 # @BLURB: This eclass provides functions for fetch and unpack darcs repositories
 # @DESCRIPTION:
 # This eclass provides the generic darcs fetching functions.
 #
 # Define the EDARCS_REPOSITORY variable at least.
 # The ${S} variable is set to ${WORKDIR}/${P}.
-# @THANKS TO:
-#               <rphillips@gentoo.org> (tla eclass author)
-# Andres Loeh   <kosmikus@gentoo.org> (darcs.eclass author)
-# Alexander Vershilov <alexander.vershilov@gmail.com> (various contributions)
 
 # TODO:
 






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-06-08  3:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-01 19:24 [gentoo-commits] gentoo-x86 commit in eclass: darcs.eclass Lennart Kolmodin (kolmodin)
  -- strict thread matches above, loose matches on Subject: below --
2008-05-14 18:13 Lennart Kolmodin (kolmodin)
2010-03-14 12:31 Lennart Kolmodin (kolmodin)
2010-07-19  2:52 Sergei Trofimovich (slyfox)
2010-11-01 20:54 Sergei Trofimovich (slyfox)
2011-01-30 10:27 Sergei Trofimovich (slyfox)
2012-06-08  3:39 Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox