Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: eutils.eclass
Date: Sun, 09 Jan 2011 02:17:02
Message-Id: 20110109021653.EF8C120057@flycatcher.gentoo.org
1 vapier 11/01/09 02:16:53
2
3 Modified: eutils.eclass
4 Log:
5 warn about relative paths in patches
6
7 Revision Changes Path
8 1.353 eclass/eutils.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/eutils.eclass?rev=1.353&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/eutils.eclass?rev=1.353&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/eutils.eclass?r1=1.352&r2=1.353
13
14 Index: eutils.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v
17 retrieving revision 1.352
18 retrieving revision 1.353
19 diff -u -r1.352 -r1.353
20 --- eutils.eclass 22 Nov 2010 00:31:03 -0000 1.352
21 +++ eutils.eclass 9 Jan 2011 02:16:53 -0000 1.353
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2009 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.352 2010/11/22 00:31:03 vapier Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.353 2011/01/09 02:16:53 vapier Exp $
27
28 # @ECLASS: eutils.eclass
29 # @MAINTAINER:
30 @@ -360,6 +360,13 @@
31 count=1
32 printf "NOTE: skipping -p0 due to absolute paths in patch:\n%s\n" "${abs_paths}" >> "${STDERR_TARGET}"
33 fi
34 + # Similar reason, but with relative paths.
35 + local rel_paths=$(egrep -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}")
36 + if [[ -n ${rel_paths} ]] ; then
37 + eqawarn "QA Notice: Your patch uses relative paths '../'."
38 + eqawarn " In the future this will cause a failure."
39 + eqawarn "${rel_paths}"
40 + fi
41
42 # Dynamically detect the correct -p# ... i'm lazy, so shoot me :/
43 while [[ ${count} -lt 5 ]] ; do