mirror of
https://github.com/Telecominfraproject/ols-nos.git
synced 2025-12-02 14:13:43 +00:00
[build] Fix dpkg front lock issue with apt-get (#12332)
This commit is contained in:
10
src/sonic-build-hooks/hooks/dpkg
Normal file
10
src/sonic-build-hooks/hooks/dpkg
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /usr/local/share/buildinfo/scripts/buildinfo_base.sh
|
||||
REAL_COMMAND=$(get_command dpkg)
|
||||
COMMAND_INFO="Locked by command: $REAL_COMMAND $@"
|
||||
lock_result=$(acquire_apt_installation_lock "$COMMAND_INFO" )
|
||||
$REAL_COMMAND "$@"
|
||||
command_result=$?
|
||||
[ "$lock_result" == y ] && release_apt_installation_lock
|
||||
exit $command_result
|
||||
Reference in New Issue
Block a user