/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.306 Revision 1.307
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.306 2008/09/20 18:58:57 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.307 2008/09/20 19:03:31 vapier Exp $
4 4
5# @ECLASS: eutils.eclass 5# @ECLASS: eutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: many extra (but common) functions that are used in ebuilds 8# @BLURB: many extra (but common) functions that are used in ebuilds
264 PATCH_TARGET="${x}" 264 PATCH_TARGET="${x}"
265 fi 265 fi
266 266
267 # Check for absolute paths in patches. If sandbox is disabled, 267 # Check for absolute paths in patches. If sandbox is disabled,
268 # people could (accidently) patch files in the root filesystem. 268 # people could (accidently) patch files in the root filesystem.
269 # Or trigger other unpleasantries #237667. 269 # Or trigger other unpleasantries #237667. So disallow -p0 on
270 # such patches.
270 local abs_paths=$(egrep -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }') 271 local abs_paths=$(egrep -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }')
271 if [[ -n ${abs_paths} ]] ; then 272 if [[ -n ${abs_paths} ]] ; then
272 ewarn "Absolute paths found in ${patchname}! Please remove them!" 273 count=1
273 ewarn "${abs_paths}" 274 echo "NOTE: skipping -p0 due to absolute paths in patch:" >> ${STDERR_TARGET%/*}/${patchname}-${STDERR_TARGET##*/}
275 echo "${abs_paths}" >> ${STDERR_TARGET%/*}/${patchname}-${STDERR_TARGET##*/}
274 fi 276 fi
275 277
276 # Allow for prefix to differ ... im lazy, so shoot me :/ 278 # Allow for prefix to differ ... im lazy, so shoot me :/
277 while [ "${count}" -lt 5 ] 279 while [ "${count}" -lt 5 ]
278 do 280 do

Legend:
Removed from v.1.306  
changed lines
  Added in v.1.307

  ViewVC Help
Powered by ViewVC 1.1.20