1 |
On Thursday, December 30, 2010 19:42:35 Robin H. Johnson wrote: |
2 |
> On Thu, Dec 30, 2010 at 07:04:25PM -0500, Mike Frysinger wrote: |
3 |
> > epatch was changed to auto-skip the first path element when it is |
4 |
> > absolute (starts with a slash). the reason was to avoid issues with |
5 |
> > patches touching files outside of $PWD (which is bad if sandbox is |
6 |
> > disabled). |
7 |
> |
8 |
> +1 from me, but can we have a QA prefix on the ewarn output? |
9 |
|
10 |
--- eutils.eclass 22 Nov 2010 00:31:03 -0000 1.352 |
11 |
+++ eutils.eclass 31 Dec 2010 01:28:37 -0000 |
12 |
@@ -360,6 +360,13 @@ epatch() { |
13 |
count=1 |
14 |
printf "NOTE: skipping -p0 due to absolute paths in patch:\n%s\n" "${abs_paths}" >> "${STDERR_TARGET}" |
15 |
fi |
16 |
+ # Similar reason, but with relative paths. |
17 |
+ local rel_paths=$(egrep -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}") |
18 |
+ if [[ -n ${rel_paths} ]] ; then |
19 |
+ eqawarn "QA Notice: Your patch has relative paths." |
20 |
+ eqawarn " In the future this will cause a failure." |
21 |
+ eqawarn "${rel_paths}" |
22 |
+ fi |
23 |
|
24 |
# Dynamically detect the correct -p# ... i'm lazy, so shoot me :/ |
25 |
while [[ ${count} -lt 5 ]] ; do |
26 |
-mike |