From ed4f19fb28142a2221c9c5c27aede3ecdb9b83c8 Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Sat, 19 Mar 2022 21:48:27 +0800 Subject: [PATCH] [Build][Bug]: fix the warning message not printed as expected issue (#10278) Fix the warning message not printed as expected issue --- src/sonic-build-hooks/hooks/apt-get | 4 ++-- src/sonic-build-hooks/scripts/buildinfo_base.sh | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/sonic-build-hooks/hooks/apt-get b/src/sonic-build-hooks/hooks/apt-get index f1f789542b..625b068436 100755 --- a/src/sonic-build-hooks/hooks/apt-get +++ b/src/sonic-build-hooks/hooks/apt-get @@ -10,10 +10,10 @@ if [ -z "$REAL_COMMAND" ]; then exit 1 fi -INSTALL=$(check_apt_install) +INSTALL=$(check_apt_install "$@") COMMAND_INFO="Locked by command: $REAL_COMMAND $@" if [ "$INSTALL" == y ]; then - check_apt_version + check_apt_version "$@" lock_result=$(acquire_apt_installation_lock "$COMMAND_INFO" ) $REAL_COMMAND "$@" command_result=$? diff --git a/src/sonic-build-hooks/scripts/buildinfo_base.sh b/src/sonic-build-hooks/scripts/buildinfo_base.sh index 22ab3da4e9..3873d13629 100755 --- a/src/sonic-build-hooks/scripts/buildinfo_base.sh +++ b/src/sonic-build-hooks/scripts/buildinfo_base.sh @@ -213,6 +213,10 @@ check_apt_version() continue fi + if [ "$para" == "install" ]; then + continue + fi + if [[ "$para" == *=* ]]; then continue else