# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.198 2006/12/02 18:43:37 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.199 2006/12/10 18:21:54 phreak Exp $
# Description: kernel.eclass rewrite for a clean base regarding the 2.6
# series of kernel with back-compatibility for 2.4
ebegin "Applying ${i/*\//} (-p${PATCH_DEPTH}+)"
while [ ${PATCH_DEPTH} -lt 5 ]; do
echo "Attempting Dry-run:" >> ${STDERR_T}
- echo "cmd: patch -p${PATCH_DEPTH} --dry-run -f < ${i}" >> ${STDERR_T}
+ echo "cmd: patch -p${PATCH_DEPTH} --no-backup-if-mismatch --dry-run -f < ${i}" >> ${STDERR_T}
echo "=======================================================" >> ${STDERR_T}
- if [ $(patch -p${PATCH_DEPTH} --dry-run -f < ${i} >> ${STDERR_T}) $? -eq 0 ]; then
+ if [ $(patch -p${PATCH_DEPTH} --no-backup-if-mismatch --dry-run -f < ${i} >> ${STDERR_T}) $? -eq 0 ]; then
echo "Attempting patch:" > ${STDERR_T}
- echo "cmd: patch -p${PATCH_DEPTH} -f < ${i}" >> ${STDERR_T}
+ echo "cmd: patch -p${PATCH_DEPTH} --no-backup-if-mismatch -f < ${i}" >> ${STDERR_T}
echo "=======================================================" >> ${STDERR_T}
- if [ $(patch -p${PATCH_DEPTH} -f < ${i} >> ${STDERR_T}) "$?" -eq 0 ]; then
+ if [ $(patch -p${PATCH_DEPTH} --no-backup-if-mismatch -f < ${i} >> ${STDERR_T}) "$?" -eq 0 ]; then
eend 0
rm ${STDERR_T}
break