Skip to content

Commit

Permalink
[build] Fix dpkg front lock issue with apt-get (#12332)
Browse files Browse the repository at this point in the history
  • Loading branch information
liushilongbuaa authored Oct 11, 2022
1 parent 247bd78 commit c75dfe8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/sonic-build-hooks/hooks/dpkg
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c75dfe8

Please sign in to comment.