diff --git a/src/sonic-build-hooks/scripts/buildinfo_base.sh b/src/sonic-build-hooks/scripts/buildinfo_base.sh index 1756eb84db..b702a2dbc1 100755 --- a/src/sonic-build-hooks/scripts/buildinfo_base.sh +++ b/src/sonic-build-hooks/scripts/buildinfo_base.sh @@ -217,6 +217,11 @@ run_pip_command() $REAL_COMMAND "${parameters[@]}" local result=$? + if [ "$result" != 0 ]; then + echo "Failed to run the command with constraint, try to install with the original command" 1>&2 + $REAL_COMMAND "$@" + result=$? + fi rm $tmp_version_file return $result }