Skip to content

Commit 280939b

Browse files
xumiaqiluo-msft
authored andcommitted
[Build] Support to use loosen version when failed to install python packages (#14013)
Why I did it [Build] Support to use loosen version when failed to install python packages It is to fix the issue #14012 How I did it Try to use the installation command without constraint How to verify it
1 parent 06be005 commit 280939b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/sonic-build-hooks/scripts/buildinfo_base.sh

+5
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ run_pip_command()
183183

184184
$REAL_COMMAND "${parameters[@]}"
185185
local result=$?
186+
if [ "$result" != 0 ]; then
187+
echo "Failed to run the command with constraint, try to install with the original command" 1>&2
188+
$REAL_COMMAND "$@"
189+
result=$?
190+
fi
186191
rm $tmp_version_file
187192
return $result
188193
}

0 commit comments

Comments
 (0)