summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2010-11-01 20:54:46 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2010-11-01 20:54:46 +0000
commite52e12da3a02ec39ad9eea57afe738761fe52fd2 (patch)
treeb2c4921d1d51868d7e36a7cdb3693d5bec6a7a1a /eclass
parentStable on amd64 wrt bug #343689. Remove old ebuilds (diff)
downloadhistorical-e52e12da3a02ec39ad9eea57afe738761fe52fd2.tar.gz
historical-e52e12da3a02ec39ad9eea57afe738761fe52fd2.tar.bz2
historical-e52e12da3a02ec39ad9eea57afe738761fe52fd2.zip
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!
Diffstat (limited to 'eclass')
-rw-r--r--eclass/darcs.eclass11
1 files changed, 10 insertions, 1 deletions
diff --git a/eclass/darcs.eclass b/eclass/darcs.eclass
index 17515f7d09ac..a4b4a777251c 100644
--- a/eclass/darcs.eclass
+++ b/eclass/darcs.eclass
@@ -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 @@ SRC_URI=""
# 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 @@ darcs_fetch() {
eval $cmdupdate || die "darcs update command failed"
fi
+ export EDARCS_PATCHCOUNT=$(darcs_patchcount)
+ einfo " patches in repo: ${EDARCS_PATCHCOUNT}"
+
popd
}