diff options
author | 2004-02-16 18:30:33 +0000 | |
---|---|---|
committer | 2004-02-16 18:30:33 +0000 | |
commit | f827e630a602318c7864a4204ad4cdf401c8f091 (patch) | |
tree | b3f8c8cc993a6b0105f84743308f2e32865a0762 /eclass | |
parent | Disable icc compilation as it breaks too many things. Also, revert to -prefi... (diff) | |
download | historical-f827e630a602318c7864a4204ad4cdf401c8f091.tar.gz historical-f827e630a602318c7864a4204ad4cdf401c8f091.tar.bz2 historical-f827e630a602318c7864a4204ad4cdf401c8f091.zip |
update to cause unipatch to fatal error if file doesnt exist (or is not readable)
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/kernel-2.eclass | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index 65f8b59175db..05bafdfb0010 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.28 2004/02/16 00:40:41 johnm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.29 2004/02/16 18:30:33 johnm Exp $ # kernel.eclass rewrite for a clean base regarding the 2.6 series of kernel # with back-compatibility for 2.4 @@ -350,13 +350,26 @@ unipatch() { x=${i/*\//} x=${x/\.${extention}/} - if [ -n "${UNIPATCH_STRICTORDER}" -a -n "${PIPE_CMD}" ] + if [ -n "${PIPE_CMD}" ] then - STRICT_COUNT=$((${STRICT_COUNT} + 1)) - mkdir -p ${KPATCH_DIR}/${STRICT_COUNT}/ - $(${PIPE_CMD} ${i} > ${KPATCH_DIR}/${STRICT_COUNT}/${x}.patch) - else - $(${PIPE_CMD} ${i} > ${KPATCH_DIR}/${x}.patch) + if [ ! -r "${i}" ] + then + echo + eerror "FATAL: unable to locate:" + eerror "${i}" + eerror "for read-only. The file either has incorrect permissions" + eerror "or does not exist." + die Unable to locate ${i} + fi + + if [ -n "${UNIPATCH_STRICTORDER}" ] + then + STRICT_COUNT=$((${STRICT_COUNT} + 1)) + mkdir -p ${KPATCH_DIR}/${STRICT_COUNT}/ + $(${PIPE_CMD} ${i} > ${KPATCH_DIR}/${STRICT_COUNT}/${x}.patch) + else + $(${PIPE_CMD} ${i} > ${KPATCH_DIR}/${x}.patch) + fi fi fi done |