download_and_compile.sh: only print COMPONENT_BRANCH[foo]=bar for built components
Only those components present in WHATTOBUILD are really interesting when printing and logging COMPONENT_BRANCH[foo]=bar. Inter-component deps are taken into account before doing that, since they may add components to WHATTOBUILD.
This commit is contained in:
parent
c4c8f0a099
commit
1f3f4ea353
@ -413,6 +413,34 @@ function _depends(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _maybe_add_intercomponent_deps(){
|
||||||
|
local comp_word
|
||||||
|
|
||||||
|
if [[ "$IGNORE_INTERCOMPONENT_DEPS" = "y" ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# FlightGear requires SimGear
|
||||||
|
_depends FGFS SIMGEAR
|
||||||
|
# TerraGear requires SimGear
|
||||||
|
_depends TERRAGEAR SIMGEAR
|
||||||
|
|
||||||
|
# Print a helpful message if some components were automatically added
|
||||||
|
if (( nb_added_intercomponent_deps > 0 )); then
|
||||||
|
if (( nb_added_intercomponent_deps > 1 )); then
|
||||||
|
comp_word='components'
|
||||||
|
else
|
||||||
|
comp_word='component'
|
||||||
|
fi
|
||||||
|
_printLog "$PROGNAME: automatically added $nb_added_intercomponent_deps" \
|
||||||
|
"$comp_word based on"
|
||||||
|
_printLog "intercomponent dependencies. Use option" \
|
||||||
|
"--ignore-intercomponent-deps if you"
|
||||||
|
_printLog "want to disable this behavior."
|
||||||
|
_printLog
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function _printVersion(){
|
function _printVersion(){
|
||||||
echo "$PROGNAME version $VERSION"
|
echo "$PROGNAME version $VERSION"
|
||||||
echo
|
echo
|
||||||
@ -862,6 +890,8 @@ _log "COMPOSITOR=$COMPOSITOR"
|
|||||||
_log "DIRECTORY=$CBD"
|
_log "DIRECTORY=$CBD"
|
||||||
_log
|
_log
|
||||||
|
|
||||||
|
_maybe_add_intercomponent_deps # this may add elements to WHATTOBUILD
|
||||||
|
|
||||||
_printLog "$SUITE_DESCRIPTION"
|
_printLog "$SUITE_DESCRIPTION"
|
||||||
_printLog
|
_printLog
|
||||||
_printLog "\
|
_printLog "\
|
||||||
@ -873,43 +903,16 @@ components)."
|
|||||||
_printLog
|
_printLog
|
||||||
_printLog "Branch used for each component:"
|
_printLog "Branch used for each component:"
|
||||||
_printLog
|
_printLog
|
||||||
|
# This method guarantees a stable order for the output
|
||||||
for component in "${WHATTOBUILD_AVAIL[@]}"; do
|
for component in "${WHATTOBUILD_AVAIL[@]}"; do
|
||||||
|
if _elementIn "$component" "${WHATTOBUILD[@]}"; then
|
||||||
_printLog " COMPONENT_BRANCH[$component]=${COMPONENT_BRANCH[$component]}"
|
_printLog " COMPONENT_BRANCH[$component]=${COMPONENT_BRANCH[$component]}"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
_log
|
_log
|
||||||
_logSep
|
_logSep
|
||||||
|
|
||||||
#######################################################
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
# ****************************************************************************
|
|
||||||
# * Inter-component Dependencies *
|
|
||||||
# ****************************************************************************
|
|
||||||
|
|
||||||
if [ "$IGNORE_INTERCOMPONENT_DEPS" = "n" ]; then
|
|
||||||
# FlightGear requires SimGear
|
|
||||||
_depends FGFS SIMGEAR
|
|
||||||
# TerraGear requires SimGear
|
|
||||||
_depends TERRAGEAR SIMGEAR
|
|
||||||
|
|
||||||
# Print a helpful message if some components were automatically added
|
|
||||||
if (( nb_added_intercomponent_deps > 0 )); then
|
|
||||||
if (( nb_added_intercomponent_deps > 1 )); then
|
|
||||||
comp_word='components'
|
|
||||||
else
|
|
||||||
comp_word='component'
|
|
||||||
fi
|
|
||||||
_printLog "$PROGNAME: automatically added $nb_added_intercomponent_deps" \
|
|
||||||
"$comp_word based on"
|
|
||||||
_printLog "intercomponent dependencies. Use option" \
|
|
||||||
"--ignore-intercomponent-deps if you"
|
|
||||||
_printLog "want to disable this behavior."
|
|
||||||
_printLog
|
|
||||||
unset -v comp_word
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ****************************************************************************
|
# ****************************************************************************
|
||||||
# * Component dependencies on distribution packages *
|
# * Component dependencies on distribution packages *
|
||||||
# ****************************************************************************
|
# ****************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user