Skip to content

Commit a053b55

Browse files
liushilongbuaamssonicbld
authored andcommitted
[build] Fix dpkg front lock issue with apt-get (sonic-net#12332)
1 parent d3612c1 commit a053b55

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

+10
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)