diff --git a/kernel-2.eclass b/kernel-2.eclass index 195fd7f..d00f9e8 100644 --- a/kernel-2.eclass +++ b/kernel-2.eclass @@ -990,12 +990,12 @@ unipatch() { if [ -z "${PATCH_DEPTH}" ]; then PATCH_DEPTH=0; fi - ebegin "Applying ${i/*\//} (-p${PATCH_DEPTH}+)" while [ ${PATCH_DEPTH} -lt 5 ]; do echo "Attempting Dry-run:" >> ${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} --no-backup-if-mismatch --dry-run -f < ${i} >> ${STDERR_T}) $? -eq 0 ]; then + ebegin "Applying ${i/*\//} (-p${PATCH_DEPTH})" echo "Attempting patch:" > ${STDERR_T} echo "cmd: patch -p${PATCH_DEPTH} --no-backup-if-mismatch -f < ${i}" >> ${STDERR_T} echo "=======================================================" >> ${STDERR_T} @@ -1008,17 +1008,17 @@ unipatch() { eerror "Failed to apply patch ${i/*\//}" eerror "Please attach ${STDERR_T} to any bug you may post." eshopts_pop - die "Failed to apply ${i/*\//}" + die "Failed to apply ${i/*\//} on patch depth ${PATCH_DEPTH}." fi else PATCH_DEPTH=$((${PATCH_DEPTH} + 1)) fi done if [ ${PATCH_DEPTH} -eq 5 ]; then - eend 1 + eerror "Failed to dry-run patch ${i/*\//}" eerror "Please attach ${STDERR_T} to any bug you may post." eshopts_pop - die "Unable to dry-run patch." + die "Unable to dry-run patch on any patch depth lower than 5." fi done done