summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-07-15 04:52:57 +0000
committerjhb <jhb@FreeBSD.org>2004-07-15 04:52:57 +0000
commitf0c929d4ea72bcb9501f921008c02b4f26b0c24e (patch)
tree0364eb67386b00e512f4c8f8e869030e7985dd28
parent508b8bed27289f2d5cfce89c40deca1b1ae1e72f (diff)
downloadFreeBSD-src-f0c929d4ea72bcb9501f921008c02b4f26b0c24e.zip
FreeBSD-src-f0c929d4ea72bcb9501f921008c02b4f26b0c24e.tar.gz
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
-rw-r--r--release/Makefile16
1 files 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
OpenPOWER on IntegriCloud