# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.442 2015/01/14 22:50:02 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.443 2015/03/20 18:22:05 vapier Exp $
# @ECLASS: eutils.eclass
# @MAINTAINER:
einfo " ${patchname} ..."
fi
+ # Handle aliased patch command #404447 #461568
+ local patch="patch"
+ eval $(alias patch 2>/dev/null | sed 's:^alias ::')
+
# most of the time, there will only be one run per unique name,
# but if there are more, make sure we get unique log filenames
local STDERR_TARGET="${T}/${patchname}.out"
STDERR_TARGET="${T}/${patchname}-$$.out"
fi
- printf "***** %s *****\nPWD: %s\n\n" "${patchname}" "${PWD}" > "${STDERR_TARGET}"
+ printf "***** %s *****\nPWD: %s\nPATCH TOOL: %s -> %s\nVERSION INFO:\n%s\n\n" \
+ "${patchname}" \
+ "${PWD}" \
+ "${patch}" \
+ "$(type -P "${patch}")" \
+ "$(${patch} --version)" \
+ > "${STDERR_TARGET}"
# Decompress the patch if need be
local count=0
# 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="${patch} -p${count} ${EPATCH_OPTS}"