diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-04-25 18:38:02 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-04-25 18:38:02 +0000 |
commit | 42d7ba9ddeca6c5478ff30fb6bd8209a8f904965 (patch) | |
tree | 1e589c9b8149f7e6184e6ad12b7eed7da4e97619 /eclass/eutils.eclass | |
parent | Restrict test suite as it does nothing other than insmod the module (diff) | |
download | historical-42d7ba9ddeca6c5478ff30fb6bd8209a8f904965.tar.gz historical-42d7ba9ddeca6c5478ff30fb6bd8209a8f904965.tar.bz2 historical-42d7ba9ddeca6c5478ff30fb6bd8209a8f904965.zip |
epatch: handle aliased `patch` commands in a way that works with <=bash-3.2 #461568 by Michał Górny
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r-- | eclass/eutils.eclass | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 467cf1727cd3..04e99e35dff8 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -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/eutils.eclass,v 1.416 2013/03/31 02:17:12 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.417 2013/04/25 18:38:02 vapier Exp $ # @ECLASS: eutils.eclass # @MAINTAINER: @@ -483,8 +483,11 @@ epatch() { # Dynamically detect the correct -p# ... i'm lazy, so shoot me :/ local patch_cmd + # Handle aliased patch command #404447 #461568 + local patch="patch" + eval $(alias patch 2>/dev/null | sed 's:^alias ::') while [[ ${count} -lt 5 ]] ; do - patch_cmd="${BASH_ALIASES[patch]:-patch} -p${count} ${EPATCH_OPTS}" + patch_cmd="${patch} -p${count} ${EPATCH_OPTS}" # Generate some useful debug info ... ( |