diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-01-09 02:16:53 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-01-09 02:16:53 +0000 |
commit | 9aae2a875b7a7c98d8034fea55ed1bc3b1ff0929 (patch) | |
tree | ae21baa61c87b56d11b6a4782a4df030b7e2a248 /eclass | |
parent | Linux patch 2.6.32.28 (diff) | |
download | historical-9aae2a875b7a7c98d8034fea55ed1bc3b1ff0929.tar.gz historical-9aae2a875b7a7c98d8034fea55ed1bc3b1ff0929.tar.bz2 historical-9aae2a875b7a7c98d8034fea55ed1bc3b1ff0929.zip |
warn about relative paths in patches
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/eutils.eclass | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index e3b029e62f3c..bab1f6248903 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.352 2010/11/22 00:31:03 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.353 2011/01/09 02:16:53 vapier Exp $ # @ECLASS: eutils.eclass # @MAINTAINER: @@ -360,6 +360,13 @@ epatch() { count=1 printf "NOTE: skipping -p0 due to absolute paths in patch:\n%s\n" "${abs_paths}" >> "${STDERR_TARGET}" fi + # Similar reason, but with relative paths. + local rel_paths=$(egrep -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}") + if [[ -n ${rel_paths} ]] ; then + eqawarn "QA Notice: Your patch uses relative paths '../'." + eqawarn " In the future this will cause a failure." + eqawarn "${rel_paths}" + fi # Dynamically detect the correct -p# ... i'm lazy, so shoot me :/ while [[ ${count} -lt 5 ]] ; do |