Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/share
diff options
context:
space:
mode:
authorAllan Jude <allan@klarasystems.com>2021-10-31 17:20:37 +0300
committerEmmanuel Vadot <manu@bidouilliste.com>2021-11-03 18:52:34 +0300
commitee5bbca734b541504e0d023967a352724bf1dcd8 (patch)
tree008ddaf1ed349cbbc9fc4aab3cacc1451dd5c533 /src/share
parent469202f69656e5d58a1b1dd0cdc1ba8bd270f99b (diff)
image: Allow pre-build script to optionally replace the built-in _prepare
If the prebuild script sets SKIP_PREPARE then we don't run ${MAINMEDIATYPE}_prepare ${SUBMEDIATYPE} Allowing users to replace the built-in _prepare for the image type Cleans up the old 'skip' method that did nothing after b768a3692998
Diffstat (limited to 'src/share')
-rw-r--r--src/share/poudriere/image.sh13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/share/poudriere/image.sh b/src/share/poudriere/image.sh
index 290ad2c9..3715b79c 100644
--- a/src/share/poudriere/image.sh
+++ b/src/share/poudriere/image.sh
@@ -426,8 +426,6 @@ boot/kernel.old
nxb-bin
EOF
-${MAINMEDIATYPE}_prepare ${SUBMEDIATYPE} || err 1 "${MAINMEDIATYPE}_prepare failed"
-
# Need to convert IMAGESIZE from bytes to bibytes
# This conversion is needed to be compliant with marketing 'unit'
# without this, a 2GiB image will not fit into a 2GB flash disk (=1862MiB)
@@ -493,17 +491,14 @@ if [ -n "${SWAPSIZE}" ]; then
SWAPSIZE="${NEW_SWAPSIZE_SIZE}${NEW_SWAPSIZE_UNIT}"
fi
+SKIP_PREPARE=
if [ -n "${PRE_BUILD_SCRIPT}" ]; then
. "${PRE_BUILD_SCRIPT}"
- REAL_MEDIATYPE="${MEDIATYPE}"
- MEDIATYPE="skip"
fi
-case "${MEDIATYPE}" in
-skip)
- MEDIATYPE="${REAL_MEDIATYPE}"
- ;;
-esac
+if [ -z "$SKIP_PREPARE" ]; then
+ ${MAINMEDIATYPE}_prepare ${SUBMEDIATYPE} || err 1 "${MAINMEDIATYPE}_prepare failed"
+fi
# Run the install world function
${INSTALLWORLD}