diff options
| author | onefang | 2020-01-03 01:05:54 +1000 |
|---|---|---|
| committer | onefang | 2020-01-03 01:05:54 +1000 |
| commit | 923a29b57291e9506f24c15799ea91d95c8441cf (patch) | |
| tree | d7afe7813d47e3657bb0428ad0c0a9f02b374069 | |
| parent | Make a couple of convenience strings. (diff) | |
| download | apt-panopticon-923a29b57291e9506f24c15799ea91d95c8441cf.zip apt-panopticon-923a29b57291e9506f24c15799ea91d95c8441cf.tar.gz apt-panopticon-923a29b57291e9506f24c15799ea91d95c8441cf.tar.bz2 apt-panopticon-923a29b57291e9506f24c15799ea91d95c8441cf.tar.xz | |
Fix another race condition.
| -rwxr-xr-x | apt-panopticon.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 582866b..ac18402 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
| @@ -843,6 +843,11 @@ local parseRelease = function(host) | |||
| 843 | else | 843 | else |
| 844 | -- TODO - compare to the pkgmaster copy. | 844 | -- TODO - compare to the pkgmaster copy. |
| 845 | if APT.testing('Updated') then | 845 | if APT.testing('Updated') then |
| 846 | while not APT.checkFile('results_old/' .. fRp) do | ||
| 847 | D('*<* About to yield coroutine while waiting on - not APT.checkFile(results_old/' .. fRp .. ')') | ||
| 848 | coroutine.yield() | ||
| 849 | D('*>* Resumed coroutine while waiting on - not APT.checkFile(results_old/' .. fRp .. ')') | ||
| 850 | end | ||
| 846 | local pkt = APT.exe([[TZ="GMT" date -d "$(grep '^Date:' results/]] .. fRp .. [[ | cut -d ' ' -f 2-)" '+%s']]):Do().result | 851 | local pkt = APT.exe([[TZ="GMT" date -d "$(grep '^Date:' results/]] .. fRp .. [[ | cut -d ' ' -f 2-)" '+%s']]):Do().result |
| 847 | pkt = tonumber(pkt:sub(2, -2)) | 852 | pkt = tonumber(pkt:sub(2, -2)) |
| 848 | local new = APT.exe([[TZ="GMT" date -d "$(grep '^Date:' ]] .. fR .. [[.SORTED | cut -d ' ' -f 2-)" '+%s']]):Do().result | 853 | local new = APT.exe([[TZ="GMT" date -d "$(grep '^Date:' ]] .. fR .. [[.SORTED | cut -d ' ' -f 2-)" '+%s']]):Do().result |
