From 2340809bcda165d46f672029a546f44a5df71c9c Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 24 Dec 2019 14:57:34 +1000 Subject: Wait for things to start up before checking for them. Sometimes you have to give the system time to actually start executing things you are about to check for. --- apt-panopticon.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 8f8a363..d6227ec 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -823,7 +823,7 @@ drwxr-x--- 2 www-data www-data 4096 2019-12-23 01:02:57.000000000 +1000 aptly -rw-r--r-- 1 www-data www-data 7129 2019-12-23 01:03:54.000000000 +1000 curl-debs-pkgmaster.devuan.org.log ]] -os.execute('sleep 2') +os.execute('sleep 1') -- Wait for things to start up before checking for them. while 0 < APT.checkExes(downloadLock .. list.out .. "-" .. host .. ".log") do D('*<* About to yield coroutine while waiting on - 0 < APT.checkExes(' .. downloadLock .. list.out .. '-' .. host .. '.log') coroutine.yield() @@ -963,6 +963,7 @@ if 0 < #arg then end if APT.origin and APT.options.referenceSite.value ~= pu.host then +os.execute('sleep 1') -- Wait for things to start up before checking for them. while 0 < APT.checkExes(downloadLock .. "Release-" .. pu.host .. ".log") do os.execute("sleep 10") end while 0 < APT.checkExes(downloadLock .. "Packages-" .. pu.host .. ".log") do os.execute("sleep 10") end while 0 < APT.checkExes(downloadLock .. "package-" .. pu.host .. ".log") do os.execute("sleep 10") end @@ -1007,6 +1008,7 @@ else end end +os.execute('sleep 1') -- Wait for things to start up before checking for them. while 1 <= APT.checkExes("apt-panopticon.lua " .. sendArgs) do os.execute("sleep 10") end for k, v in pairs(APT.mirrors) do @@ -1030,6 +1032,7 @@ else end end +os.execute('sleep 1') -- Wait for things to start up before checking for them. while 1 <= APT.checkExes('tar -c --xz ' .. adt .. ' -f ' .. adt .. '.tar.xz') do os.execute("sleep 10") end if nil ~= adt then os.execute('rm -fr ' .. adt .. ' 2>/dev/null') end -- cgit v1.1