diff options
author | Donnie Berkholz <spyderous@gentoo.org> | 2004-02-21 22:33:43 +0000 |
---|---|---|
committer | Donnie Berkholz <spyderous@gentoo.org> | 2004-02-21 22:33:43 +0000 |
commit | 323ab8f8d447d831b4a3d1a26528c613f9433e1f (patch) | |
tree | 7594ddbf9b9089fc4f4401508c2f886fa8cee250 /eclass | |
parent | Initial Import. (Manifest recommit) (diff) | |
download | gentoo-2-323ab8f8d447d831b4a3d1a26528c613f9433e1f.tar.gz gentoo-2-323ab8f8d447d831b4a3d1a26528c613f9433e1f.tar.bz2 gentoo-2-323ab8f8d447d831b4a3d1a26528c613f9433e1f.zip |
Add patch_exclude() for easy, verbose, pattern-matching patch exclusion.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/xfree.eclass | 22 |
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. |