From f0c929d4ea72bcb9501f921008c02b4f26b0c24e Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 15 Jul 2004 04:52:57 +0000 Subject: Remove some serious foot-shooting potential from the release Makefile. For some unknown reason, when LOCAL_PATCHES and LOCAL_SCRIPT were originally added, they were silently ignored if the actual file did not exist. As a result, if one mistyped the pathname to a patch or script, then the release silently succeeded. However, it was not built with the desired changes and no warning was given to inform the builder either. This commit explicitly checks to see that all of the defined patches and scripts exist up front and bails if any of them do not exist. I lost several hours of valuable sleeping time this evening due to this "feature" so I've finally gone and ripped out. I've tripped over this in the past several other times as well. Glanced at by: scottl --- release/Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/release/Makefile b/release/Makefile index f9a8fdd..458bd92 100644 --- a/release/Makefile +++ b/release/Makefile @@ -314,6 +314,18 @@ release rerelease: @echo "unset NOPORTS, or set at least DOMINIMALDOCPORTS to YES!" @exit 1 .endif +.if defined(LOCAL_PATCHES) && !empty(LOCAL_PATCHES) +.for p in ${LOCAL_PATCHES} +.if !exists(${p}) + @echo "The patch file ${p} does not exist!" + @exit 1 +.endif +.endfor +.endif +.if defined(LOCAL_SCRIPT) && !exists(${LOCAL_SCRIPT}) + @echo "The local script ${LOCAL_SCRIPT} does not exist!" + @exit 1 +.endif .if make(release) .if exists(${CHROOTDIR}) # The first command will fail on a handful of files that have their schg @@ -347,12 +359,10 @@ release rerelease: .endif .if defined(LOCAL_PATCHES) && !empty(LOCAL_PATCHES) .for p in ${LOCAL_PATCHES} -.if exists(${p}) patch -d ${CHROOTDIR}/usr/${RELEASESRCMODULE} ${PATCH_FLAGS} < ${p} -.endif .endfor .endif -.if defined(LOCAL_SCRIPT) && exists(${LOCAL_SCRIPT}) +.if defined(LOCAL_SCRIPT) cd ${CHROOTDIR} && env CHROOTDIR=${CHROOTDIR} BUILDNAME=${BUILDNAME} \ RELEASETAG=${RELEASETAG} ${LOCAL_SCRIPT} .endif -- cgit v1.1