diff --git a/mpbb-install-dependencies b/mpbb-install-dependencies index ac8fb92..2f955a5 100644 --- a/mpbb-install-dependencies +++ b/mpbb-install-dependencies @@ -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 diff --git a/mpbb-install-port b/mpbb-install-port index 8fc0b72..9f51a26 100644 --- a/mpbb-install-port +++ b/mpbb-install-port @@ -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 "$@"