summaryrefslogtreecommitdiff
path: root/db-list-unsigned-packages
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-10-16 15:42:10 +0200
committerMichał Masłowski <mtjm@mtjm.eu>2012-10-16 15:42:10 +0200
commitc6542576f04e6dc159e731b50a19f1a10d9d5ff3 (patch)
treed4c52f7377519476bb9abd0481d7e92e8d4fb9e4 /db-list-unsigned-packages
parentf4c42f9e68131ad4fbfb1be07fb44678eb90d6f7 (diff)
db-list-unsigned-packages: rewrite using a helper Python script.
The previous implementation parsed each tarball multiple times having quadratic time complexity in the number of packages. It was too slow for a complete run.
Diffstat (limited to 'db-list-unsigned-packages')
-rwxr-xr-xdb-list-unsigned-packages13
1 files changed, 2 insertions, 11 deletions
diff --git a/db-list-unsigned-packages b/db-list-unsigned-packages
index 35a5421..26e22eb 100755
--- a/db-list-unsigned-packages
+++ b/db-list-unsigned-packages
@@ -29,19 +29,10 @@ if [ $# -lt 1 ]; then
fi
arch=$1
-pkgarch=$2
+shift
for repo in ${PKGREPOS[@]}
do
db="${FTP_BASE}/${repo}/os/${arch}/${repo}.db"
- for f in $(tar tf $db | egrep /desc$)
- do
- if ! tar xOf $db $f | fgrep %PGPSIG% > /dev/null
- then
- if [ -z $2 ] || tar xOf $db $f | fgrep -A1 %ARCH% | fgrep $pkgarch > /dev/null
- then
- echo $repo/${f%/desc}
- fi
- fi
- done
+ "$(dirname $0)/db-list-unsigned-packages.py" "$@" < "$db"
done