aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-12-05 03:29:18 +1000
committeronefang2019-12-05 03:29:18 +1000
commitdbf52bde43dbebfb12e39895d7d9fd3bd25ab7b4 (patch)
treec4271779b3c75db4c3c08620f2b02f1724f89546
parentPack up ancient results for later. (diff)
downloadapt-panopticon-dbf52bde43dbebfb12e39895d7d9fd3bd25ab7b4.zip
apt-panopticon-dbf52bde43dbebfb12e39895d7d9fd3bd25ab7b4.tar.gz
apt-panopticon-dbf52bde43dbebfb12e39895d7d9fd3bd25ab7b4.tar.bz2
apt-panopticon-dbf52bde43dbebfb12e39895d7d9fd3bd25ab7b4.tar.xz
Store any previously parsed Packages, so we always have one to use.
-rw-r--r--.gitignore1
-rwxr-xr-xapt-panopticon.lua10
2 files changed, 7 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 4dd18d3..9a111ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
1results/ 1results/
2results_*/ 2results_*/
3Packages/
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index 3afe3a1..cf95a8e 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -713,11 +713,11 @@ local postDownload = function(host, r, k)
713 end 713 end
714 Pp:close() 714 Pp:close()
715 os.execute('sort results/' .. host .. '/merged/dists/'.. r .. dir .. 'Packages.parsed >results/' .. host .. '/merged/dists/'.. r .. dir .. 'Packages_parsed-sorted') 715 os.execute('sort results/' .. host .. '/merged/dists/'.. r .. dir .. 'Packages.parsed >results/' .. host .. '/merged/dists/'.. r .. dir .. 'Packages_parsed-sorted')
716 if checkFile('results_old/pkgmaster.devuan.org/merged/dists/' .. r .. dir .. 'Packages_parsed-sorted') then 716 if checkFile('Packages/' .. r .. dir .. 'Packages_parsed-sorted') then
717 os.execute('diff -U 0 results_old/pkgmaster.devuan.org/merged/dists/' .. r .. dir .. 'Packages_parsed-sorted ' .. 717 os.execute('diff -U 0 Packages/' .. r .. dir .. 'Packages_parsed-sorted ' ..
718 'results/pkgmaster.devuan.org/merged/dists/' .. r .. dir .. 'Packages_parsed-sorted ' .. 718 'results/pkgmaster.devuan.org/merged/dists/' .. r .. dir .. 'Packages_parsed-sorted ' ..
719 ' | grep -E "^-" | grep -Ev "^\\+\\+\\+|^---" >>results/OLD_PACKAGES_' .. r .. '.txt') 719 ' | grep -E "^-" | grep -Ev "^\\+\\+\\+|^---" >>results/OLD_PACKAGES_' .. r .. '.txt')
720 os.execute('diff -U 0 results_old/pkgmaster.devuan.org/merged/dists/' .. r .. dir .. 'Packages_parsed-sorted ' .. 720 os.execute('diff -U 0 Packages/' .. r .. dir .. 'Packages_parsed-sorted ' ..
721 'results/pkgmaster.devuan.org/merged/dists/' .. r .. dir .. 'Packages_parsed-sorted ' .. 721 'results/pkgmaster.devuan.org/merged/dists/' .. r .. dir .. 'Packages_parsed-sorted ' ..
722 ' | grep -E "^\\+" | grep -Ev "^\\+\\+\\+|^---" >>results/NEW_Packages_' .. r .. '.txt') 722 ' | grep -E "^\\+" | grep -Ev "^\\+\\+\\+|^---" >>results/NEW_Packages_' .. r .. '.txt')
723 -- Find the smallest new package for each release. 723 -- Find the smallest new package for each release.
@@ -726,8 +726,10 @@ local postDownload = function(host, r, k)
726 os.execute('grep -s " | pool/DEBIAN-SECURITY/" results/NEW_Packages_' .. r .. '.sorted.txt 2>/dev/null | head -n 1 >>results/NEW_Packages_' .. r .. '.test.txt') 726 os.execute('grep -s " | pool/DEBIAN-SECURITY/" results/NEW_Packages_' .. r .. '.sorted.txt 2>/dev/null | head -n 1 >>results/NEW_Packages_' .. r .. '.test.txt')
727 os.execute('grep -s " | pool/DEVUAN/" results/NEW_Packages_' .. r .. '.sorted.txt 2>/dev/null | head -n 1 >>results/NEW_Packages_' .. r .. '.test.txt') 727 os.execute('grep -s " | pool/DEVUAN/" results/NEW_Packages_' .. r .. '.sorted.txt 2>/dev/null | head -n 1 >>results/NEW_Packages_' .. r .. '.test.txt')
728 else 728 else
729 C("Can't find file results_old/pkgmaster.devuan.org/merged/dists/" .. r .. dir .. "Packages_parsed-sorted") 729 C("Can't find file Packages/" .. r .. dir .. "Packages_parsed-sorted")
730 end 730 end
731 os.execute('mkdir -p Packages/' .. r .. dir)
732 os.execute('mv -f results/pkgmaster.devuan.org/merged/dists/' .. r .. dir .. 'Packages_parsed-sorted Packages/' .. r .. dir .. 'Packages_parsed-sorted')
731 end 733 end
732 end 734 end
733 os.execute('rm -f results/' .. host .. '/merged/dists/' .. r .. dir .. 'Packages 2>/dev/null') 735 os.execute('rm -f results/' .. host .. '/merged/dists/' .. r .. dir .. 'Packages 2>/dev/null')