On Thursday, December 30, 2010 19:42:35 Robin H. Johnson wrote: > On Thu, Dec 30, 2010 at 07:04:25PM -0500, Mike Frysinger wrote: > > epatch was changed to auto-skip the first path element when it is > > absolute (starts with a slash). the reason was to avoid issues with > > patches touching files outside of $PWD (which is bad if sandbox is > > disabled). > > +1 from me, but can we have a QA prefix on the ewarn output?
--- eutils.eclass 22 Nov 2010 00:31:03 -0000 1.352
+++ eutils.eclass 31 Dec 2010 01:28:37 -0000
@@ -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 has 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
-mike
signature.asc
Description: This is a digitally signed message part.
