composite/hotfix: switch default hotfixing to partial core/plugins build
I have been unintentionally scrubbing packages sets in the past which is not a lot of fun so make the default hotfix mode a little less coarse. While here the biggest issue of the hotfixing is not being able to see package messages (not errors, these are shown as the build aborts) so collect them in a variable to show at the end if all was building ok. This is only relevant for multi-step hotfixing between core/plugins.
This commit is contained in:
parent
453afe5a39
commit
2aedf54827
12
README.md
12
README.md
|
@ -511,11 +511,11 @@ sets is invoked using:
|
|||
|
||||
# make hotfix[-<step>]
|
||||
|
||||
It will flush all previous packages except for ports, rebuild core and
|
||||
plugins and sign the sets if enabled. It can also explicity set "core"
|
||||
or "plugins" or "ports". Note that the "ports" step will automatically
|
||||
rebuild mismatching versions of packages or missing ones while the "core"
|
||||
and "plugins" step will start from scratch for the individual step.
|
||||
The default hotfix run is a non-destructive rebuild pass for missing
|
||||
plugins and core packages which also signs the packages. You can also
|
||||
do a full rebuild using "core" or "plugins" or "core,plugins" or
|
||||
"plugins,core" step. The "ports" step, however, will automatically
|
||||
rebuild mismatching and missing ports.
|
||||
|
||||
Any other argument (or list of arguments separated by comma) will be
|
||||
treated as a single port to be rebuilt.
|
||||
treated as individual ports to be rebuilt.
|
||||
|
|
|
@ -27,12 +27,32 @@
|
|||
|
||||
PORTSENV="DEPEND=no PRUNE=no ${PORTSENV}"
|
||||
TARGET=${1%%-*}
|
||||
MSGS=
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z "${TARGET}" -o "${TARGET}" = "plugins" -o "${TARGET}" = "core" ]; then
|
||||
eval "$(make print-STAGEDIR)"
|
||||
|
||||
if [ -z "${TARGET}" ]; then
|
||||
for STAGE in plugins core packages; do
|
||||
make ${STAGE}-hotfix
|
||||
|
||||
if [ -s ${STAGEDIR}/.pkg-msg ]; then
|
||||
MSGS="${MSGS}$(cat ${STAGEDIR}/.pkg-msg)
|
||||
"
|
||||
fi
|
||||
done
|
||||
elif [ "${TARGET}" = "plugins" -o "${TARGET}" = "core" -o \
|
||||
"${TARGET}" = "plugins,core" -o "${TARGET}" = "core,plugins" ]; then
|
||||
# force a full rebuild of selected stage(s)
|
||||
make clean-${TARGET:-"hotfix"} packages
|
||||
make clean-${TARGET:-"hotfix"}
|
||||
for STAGE in plugins core packages; do
|
||||
make ${STAGE}
|
||||
if [ -s ${STAGEDIR}/.pkg-msg ]; then
|
||||
MSGS="${MSGS}$(cat ${STAGEDIR}/.pkg-msg)
|
||||
"
|
||||
fi
|
||||
done
|
||||
elif [ "${TARGET}" = "ports" ]; then
|
||||
# force partial rebuild of out of date ports
|
||||
make ports-${1} PORTSENV="MISMATCH=no ${PORTSENV}"
|
||||
|
@ -40,3 +60,8 @@ else
|
|||
# assume quick target port(s) to rebuild from ports.conf
|
||||
make ports-${1} PORTSENV="${PORTSENV}"
|
||||
fi
|
||||
|
||||
if [ -n "${MSGS}" ]; then
|
||||
echo ">>> WARNING: The hotfixing provided additional info."
|
||||
echo -n "${MSGS}";
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue