On Thu, Dec 30, 2010 at 08:28:42PM -0500, Mike Frysinger wrote:
> 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

Mike,

Maybe we should open a tracker to identify which packages use relative paths
in their patches before making this control check fatal.

Regards,
-- 
Markos Chandras (hwoarang)
Gentoo Linux Developer
Web: http://hwoarang.silverarrow.org
Key ID: 441AC410
Key FP: AAD0 8591 E3CD 445D 6411 3477 F7F7 1E8E 441A C410

Attachment: pgphxSM73NFN6.pgp
Description: PGP signature

Reply via email to