Skip to content

Commit e04546a

Browse files
authored
[Build] Log improvement for package download failure (#21905)
#### Why I did it Currently, the log displayed during curl failure does not have enough information: `Try 5: /usr/bin/curl --retry-connrefused --retry 5 failed to get: -L` The array expansion is not done, and only the first parameter is printed (since the `log_err` function only prints `$1`). After the change: `Try 1: /usr/bin/curl --retry-connrefused --retry 5 failed to get: -L -f -o target/debs/bookworm/libgrpc-dev-dbgsym_1.39.0-1_arm64.deb https://github.com/user/a/b/c/d/test1.deb. Retry..` This would help in debugging. #### Description for the changelog Write a short (one-line) summary that describes the changes in this pull request for inclusion in the changelog: #### Link to config_db schema for YANG module changes Provide a link to `config_db` schema for the table for which the YANG model is defined. Link should point to the correct section on [Configuration.md](https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md).
1 parent 6501e48 commit e04546a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ download_packages()
256256
if [ $result -eq 0 ]; then
257257
break
258258
fi
259-
log_err "Try $i: $REAL_COMMAND failed to get: ${parameters[@]}. Retry.."
259+
log_err "Try $i: $REAL_COMMAND failed to get: ${parameters[*]}. Retry.."
260260
done
261261

262262
# Return if there is any error

0 commit comments

Comments
 (0)