summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2004-02-21 22:33:43 +0000
committerDonnie Berkholz <dberkholz@gentoo.org>2004-02-21 22:33:43 +0000
commitb599ac99ef0b1fb66d923fcf5b7db986b1a9ae45 (patch)
treeb6b704d0da8cab362701ec1988d8f77abc47a763 /eclass
parentInitial Import. (diff)
downloadhistorical-b599ac99ef0b1fb66d923fcf5b7db986b1a9ae45.tar.gz
historical-b599ac99ef0b1fb66d923fcf5b7db986b1a9ae45.tar.bz2
historical-b599ac99ef0b1fb66d923fcf5b7db986b1a9ae45.zip
Add patch_exclude() for easy, verbose, pattern-matching patch exclusion.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/xfree.eclass22
1 files changed, 21 insertions, 1 deletions
diff --git a/eclass/xfree.eclass b/eclass/xfree.eclass
index 8991e1b54d71..bd668deabdb1 100644
--- a/eclass/xfree.eclass
+++ b/eclass/xfree.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/xfree.eclass,v 1.13 2004/02/21 21:23:51 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/xfree.eclass,v 1.14 2004/02/21 22:33:43 spyderous Exp $
#
# Author: Seemant Kulleen <seemant@gentoo.org>
#
@@ -24,6 +24,26 @@ filter-patch() {
mv ${PATCH_DIR}/"*${1}*" ${PATCH_DIR}/excluded
}
+patch_exclude() {
+ # Exclude patches matching a pattern if they exist
+ einfo "Excluding patches..."
+ for PATCH_GROUP in ${@}
+ do
+ # Repress errors for non-matching patterns, they're ugly
+ for PATCH in "$(ls ${PATCHDIR}/*${PATCH_GROUP}* 2> /dev/null)"
+ do
+ if [ -a "${PATCH}" ]
+ then
+ ebegin " `basename ${PATCH}`"
+ mv -f ${PATCH} ${EXCLUDED}
+ eend 0
+ fi
+ done
+ done
+ einfo "Done excluding patches"
+}
+
+
# This is to ease kernel checks for patching and other things. (spyderous)
# Kernel checker is_kernel $1 $2 where $1 is KV_major and $2 is KV_minor.
# is_kernel "2" "4" should map to a 2.4 kernel, etc.