From 957bb0341dec8ed6042536ee675c0a09a62efdfa Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:56:23 -0400 Subject: [PATCH] api: revert use of apt-get on lock check modern `apt` has integrated lock waiting and this improves the `apt_lock_wait` function. `apt-get` does not implement that functionality and immediately returns similar to how old `apt` worked. continue using `apt` and monitor apt 3.0 for any string output changes --- api | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api b/api index 731fdab201..62ae99ccd8 100755 --- a/api +++ b/api @@ -354,7 +354,8 @@ apt_lock_wait() { #Wait until other apt processes are finished before proceeding done #Try to install a non-existent package to see if apt fails due to a lock-file. Repeat until no errors mention 'Could not get lock' - while sudo -E apt-get install lkqecjhxwqekc 2>&1 | grep -q 'Could not get lock' ;do + #NOTE: after apt 3.0 this output may change. Refer to git blame for this line for more info. + while sudo -E apt install lkqecjhxwqekc 2>&1 | grep -q 'Could not get lock' ;do sleep 1 done