From 28203cba8ef7f3cef3937dbdc32b7009e8d046f8 Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 1 Jan 2020 14:34:38 +1000 Subject: Fix the out of date reference package detection. --- apt-panopticon.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 70a9b83..7604a98 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -755,13 +755,13 @@ local parsePackages = function(host) 'results/' .. APT.options.referenceSite.value .. '/merged/dists/' .. n .. dir .. 'Packages_parsed-sorted ' .. ' | grep -E "^\\+" | grep -Ev "^\\+\\+\\+|^---" >>results/NEW_' .. list.out .. '_TMP_' .. n .. '.txt') for i, s in pairs(referenceDebs) do - if 0 < APT.exe('grep "' .. s:sub(8, -1) .. '" results/OLD_' .. list.out .. '_' .. n .. '.txt'):Do().status then - print('Reference package is out of date - ' .. s) + if 0 == APT.exe('grep -q "' .. s:sub(8, -1) .. '" results/OLD_' .. list.out .. '_' .. n .. '.txt'):log():Do().status then + print('Reference package is out of date (' .. n .. ') - ' .. s) end end for i, s in pairs(referenceDevs) do - if 0 < APT.exe('grep "' .. s:sub(8, -1) .. '" results/OLD_' .. list.out .. '_' .. n .. '.txt'):Do().status then - print('Reference package is out of date - ' .. s) + if 0 == APT.exe('grep -q "' .. s:sub(8, -1) .. '" results/OLD_' .. list.out .. '_' .. n .. '.txt'):log():Do().status then + print('Reference package is out of date (' .. n .. ') - ' .. s) end end else -- cgit v1.1