summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-01-09 02:16:53 +0000
committerMike Frysinger <vapier@gentoo.org>2011-01-09 02:16:53 +0000
commitca3bba2390a76779af425897ac06985971630685 (patch)
tree8c9f5b1c4e2a024f267047d8fba49872531ff5b2 /eclass
parentLinux patch 2.6.32.28 (diff)
downloadgentoo-2-ca3bba2390a76779af425897ac06985971630685.tar.gz
gentoo-2-ca3bba2390a76779af425897ac06985971630685.tar.bz2
gentoo-2-ca3bba2390a76779af425897ac06985971630685.zip
warn about relative paths in patches
Diffstat (limited to 'eclass')
-rw-r--r--eclass/eutils.eclass9
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