Skip to content

Commit c75dfe8

Browse files
[build] Fix dpkg front lock issue with apt-get (#12332)
1 parent 247bd78 commit c75dfe8

File tree

1 file changed

+10
-0
lines changed
  • src/sonic-build-hooks/hooks

1 file changed

+10
-0
lines changed

src/sonic-build-hooks/hooks/dpkg

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
. /usr/local/share/buildinfo/scripts/buildinfo_base.sh
4+
REAL_COMMAND=$(get_command dpkg)
5+
COMMAND_INFO="Locked by command: $REAL_COMMAND $@"
6+
lock_result=$(acquire_apt_installation_lock "$COMMAND_INFO" )
7+
$REAL_COMMAND "$@"
8+
command_result=$?
9+
[ "$lock_result" == y ] && release_apt_installation_lock
10+
exit $command_result

0 commit comments

Comments
 (0)