build/ports: add MISMATCH knob; closes #225
This commit is contained in:
parent
70495e7e75
commit
49f84e452b
|
@ -261,6 +261,7 @@ core progress. However, following option apply to PORTSENV:
|
|||
|
||||
* BATCH=no Developer mode with shell after each build failure
|
||||
* DEPEND=no Do not tamper with plugins or core packages
|
||||
* MISMATCH=no Rebuild packages that have a version mismatch
|
||||
* PRUNE=no Do not check ports integrity prior to rebuild
|
||||
|
||||
The defaults for these ports options are set to "yes". A sample
|
||||
|
|
|
@ -36,7 +36,7 @@ eval ${PORTSENV}
|
|||
ARGS=${*}
|
||||
DEPS=packages
|
||||
|
||||
for OPT in BATCH DEPEND PRUNE; do
|
||||
for OPT in BATCH DEPEND MISMATCH PRUNE; do
|
||||
VAL=$(eval echo \$${OPT});
|
||||
case ${VAL} in
|
||||
yes|no)
|
||||
|
@ -148,9 +148,13 @@ UNAME_r=\$(freebsd-version)
|
|||
if [ -L \${PKGLINK} ]; then
|
||||
PKGFILE=\$(readlink -f \${PKGLINK} || true)
|
||||
if [ -f \${PKGFILE} ]; then
|
||||
PKGVERS=\$(make -C ${PORTSDIR}/\${PORT} -v PKGVERSION \${MAKE_ARGS})
|
||||
echo ">>> Skipped version \${PKGVERS} for \${PORT_DESCR}" >> /.pkg-msg
|
||||
continue
|
||||
if [ ${MISMATCH} = "no" ]; then
|
||||
rm \${PKGFILE}
|
||||
else
|
||||
PKGVERS=\$(make -C ${PORTSDIR}/\${PORT} -v PKGVERSION \${MAKE_ARGS})
|
||||
echo ">>> Skipped version \${PKGVERS} for \${PORT_DESCR}" >> /.pkg-msg
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright (c) 2017-2023 Franco Fichtner <franco@opnsense.org>
|
||||
# Copyright (c) 2017-2024 Franco Fichtner <franco@opnsense.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
@ -32,6 +32,7 @@ STAGENUM=0
|
|||
if [ -n "${1}" ]; then
|
||||
CLEAN=plugins,core
|
||||
CONTINUE=-nightly
|
||||
PORTSENV="MISMATCH=no"
|
||||
fi
|
||||
|
||||
# Stage 1 involves basic builds and preparation, reset progress for stage 2
|
||||
|
@ -82,7 +83,8 @@ for STAGE in ${STAGE2}; do
|
|||
LOG="${LOGSDIR}/${PRODUCT_VERSION}/$(printf %02d ${STAGENUM})-${STAGE}.log"
|
||||
|
||||
# do not force rebuilds only if requested by user
|
||||
(time make ${STAGE}${CONTINUE} 2>&1 || touch ${LOG}.err) > ${LOG}
|
||||
(time make ${STAGE}${CONTINUE} PORTSENV=${PORTSENV} 2>&1 || \
|
||||
touch ${LOG}.err) > ${LOG}
|
||||
if [ -f ${LOG}.err ]; then
|
||||
echo ">>> Stage ${STAGE} was aborted due to an error, last ${LINES} lines as follows:" > ${LOG}.err
|
||||
tail -n ${LINES} ${LOG} >> ${LOG}.err
|
||||
|
|
Loading…
Reference in New Issue