mirror of
https://github.com/macports/mpbb.git
synced 2026-07-12 18:18:44 -07:00
mpbb-install-*: Fetch in separate command first
This makes it easier to identify fetch failures. Do not write to failcache when fetching failed as this is likely a temporary problem.
This commit is contained in:
@@ -113,6 +113,16 @@ install-dependencies() {
|
||||
echo "[OK]" >> "$log_status_dependencies"
|
||||
dependencies_counter=$((dependencies_counter + 1))
|
||||
else
|
||||
# $deprequestedvariants isn't quoted on purpose
|
||||
# shellcheck disable=SC2154,SC2086
|
||||
if ! "${option_prefix}/bin/port" -d fetch "$depname" $deprequestedvariants; then
|
||||
echo "Fetch of dependency '${depname}' with variants '${deprequestedvariants}' failed, aborting." >&2
|
||||
echo "[FAIL] (fetch)" >> "$log_status_dependencies"
|
||||
echo "Building '$port' ... [ERROR] (failed to fetch dependency '${depname}') maintainers: $(get-maintainers "$port" "${depname}")." >> "$log_subports_progress"
|
||||
# Do not add to failcache. This could be a temporary problem that will
|
||||
# be resolved once the file appears on mirrors.
|
||||
return 1
|
||||
fi
|
||||
# $deprequestedvariants isn't quoted on purpose
|
||||
# shellcheck disable=SC2154,SC2086
|
||||
if ! "${option_prefix}/bin/port" -dn install --unrequested "$depname" $deprequestedvariants; then
|
||||
|
||||
@@ -50,6 +50,16 @@ install-port() {
|
||||
time_start=$(date +%s)
|
||||
# $option_prefix is set in mpbb
|
||||
# shellcheck disable=SC2154
|
||||
if ! "${option_prefix}/bin/port" -dk fetch "$@"; then
|
||||
echo "Fetch of '$port' failed."
|
||||
# log: summary for the portwatcher
|
||||
echo "Fetching '$port' ... [ERROR] maintainers: $(get-maintainers "$port")." >> "$log_subports_progress"
|
||||
# Do not add to failcache. This could be a temporary problem that will
|
||||
# be resolved once the file appears on mirrors.
|
||||
return 1
|
||||
fi
|
||||
# $option_prefix is set in mpbb
|
||||
# shellcheck disable=SC2154
|
||||
if "${option_prefix}/bin/port" -dkn install "$@"; then
|
||||
# Remove failcache if it exists
|
||||
failcache_success "$@"
|
||||
|
||||
Reference in New Issue
Block a user