diff --git a/src/sonic-build-hooks/scripts/buildinfo_base.sh b/src/sonic-build-hooks/scripts/buildinfo_base.sh index 712c43baa3..4c94eaf0aa 100755 --- a/src/sonic-build-hooks/scripts/buildinfo_base.sh +++ b/src/sonic-build-hooks/scripts/buildinfo_base.sh @@ -183,6 +183,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 }