summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-09-20 19:03:31 +0000
committerMike Frysinger <vapier@gentoo.org>2008-09-20 19:03:31 +0000
commitb8ad0df11976419e92f6b242987fb0e27fd76370 (patch)
tree32df8f3d5dc4f5045a5a4c9db2e6f666af5c67f1 /eclass/eutils.eclass
parentfilter /dev/null from abs path check and include the offending line in the wa... (diff)
downloadgentoo-2-b8ad0df11976419e92f6b242987fb0e27fd76370.tar.gz
gentoo-2-b8ad0df11976419e92f6b242987fb0e27fd76370.tar.bz2
gentoo-2-b8ad0df11976419e92f6b242987fb0e27fd76370.zip
even better: dont whine about abs paths, just transparently skip the -p0 step and log why we are
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r--eclass/eutils.eclass10
1 files changed, 6 insertions, 4 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 449d13d72410..17c8880752f9 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.306 2008/09/20 18:58:57 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.307 2008/09/20 19:03:31 vapier Exp $
# @ECLASS: eutils.eclass
# @MAINTAINER:
@@ -266,11 +266,13 @@ epatch() {
# Check for absolute paths in patches. If sandbox is disabled,
# people could (accidently) patch files in the root filesystem.
- # Or trigger other unpleasantries #237667.
+ # Or trigger other unpleasantries #237667. So disallow -p0 on
+ # such patches.
local abs_paths=$(egrep -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }')
if [[ -n ${abs_paths} ]] ; then
- ewarn "Absolute paths found in ${patchname}! Please remove them!"
- ewarn "${abs_paths}"
+ count=1
+ echo "NOTE: skipping -p0 due to absolute paths in patch:" >> ${STDERR_TARGET%/*}/${patchname}-${STDERR_TARGET##*/}
+ echo "${abs_paths}" >> ${STDERR_TARGET%/*}/${patchname}-${STDERR_TARGET##*/}
fi
# Allow for prefix to differ ... im lazy, so shoot me :/